Too complex data structure?

R

robertchen117

Please ignore my first post for not clear question, here is my issue:

My log file with a long list like this item:
Fri Oct 6 00:00:23 2006: TR_execute_task( Lib/Task: library_name1/
task_name2 run by www.hp.com on 7 targets, out = 257

I know I can use $task_hash{$taskinfo} += targets; -->count by lib/
task name. Also need count the bytes according to the lib/task name.
And problems is I also need to count by time:
output should like this:

9:00am - 9:59am
8,010 task2 lib3 77 targets 200,345 output
3,221 task12 lib3 12 targets 1,530,234 output
....
10:00am - 10:59am
.....

This would need very complex data structure, please help me how to do?
Do we have hash over hash? What should we implement this?

Thanks a lot for help...
 
A

anno4000

Please ignore my first post for not clear question, here is my issue:

My log file with a long list like this item:
Fri Oct 6 00:00:23 2006: TR_execute_task( Lib/Task: library_name1/
task_name2 run by www.hp.com on 7 targets, out = 257

I know I can use $task_hash{$taskinfo} += targets; -->count by lib/
task name. Also need count the bytes according to the lib/task name.
And problems is I also need to count by time:
output should like this:

9:00am - 9:59am
8,010 task2 lib3 77 targets 200,345 output
3,221 task12 lib3 12 targets 1,530,234 output
...
10:00am - 10:59am
....

This would need very complex data structure, please help me how to do?
Do we have hash over hash? What should we implement this?

The separation in time slices presents no additional complexity in the
data structures. Just read the log file line by line, accumulating
data, until the date/time is beyond the current interval. Then print
and reset the accumulated data and start again with the last sentence
read.

That works if the file is sequential in time, which log files usually
are.

Anno

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top