App-RecordStream

 view release on metacpan or  search on metacpan

doc/recs-toptable.pod  view on Meta::CPAN

 +-----+--------+-----+-------+-----+-------+-----+--------+
 |run  |        |1    |4784128|2    |8757248|3    |13541376|
 +-----+--------+-----+-------+-----+-------+-----+--------+
 |sleep|        |4    |471040 |1    |0      |5    |471040  |
 +-----+--------+-----+-------+-----+-------+-----+--------+
 
 So, now in one table we can see all the intersections of state and priority
 values with the count and sum_rss fields. Remember that the ALL field (row and
 column) are provided by the --cube functionality of recs-collate
 
 Now, say you want to pin value, lets just look at processes in state run
 for instance:
 
 $ cat /var/tmp/psrecs | recs-collate --perfect --cube --key priority,state -a count -a sum,rss | recs-toptable --x priority,FIELD --y state -v sum_rss,count --pin state=run
 +-----+--------+-----+-------+-----+-------+-----+--------+
 |     |priority|0    |       |19   |       |ALL  |        |
 +-----+--------+-----+-------+-----+-------+-----+--------+
 |     |FIELD   |count|sum_rss|count|sum_rss|count|sum_rss |
 +-----+--------+-----+-------+-----+-------+-----+--------+
 |state|        |     |       |     |       |     |        |
 +-----+--------+-----+-------+-----+-------+-----+--------+

lib/App/RecordStream/Operation/toptable.pm  view on Meta::CPAN

|run  |        |1    |4784128|2    |8757248|3    |13541376|
+-----+--------+-----+-------+-----+-------+-----+--------+
|sleep|        |4    |471040 |1    |0      |5    |471040  |
+-----+--------+-----+-------+-----+-------+-----+--------+

__FORMAT_TEXT__
So, now in one table we can see all the intersections of state and priority
values with the count and sum_rss fields.  Remember that the ALL field (row and
column) are provided by the --cube functionality of recs-collate

Now, say you want to pin value, lets just look at processes in state run for
instance:
__FORMAT_TEXT__

\$ cat /var/tmp/psrecs | recs-collate --perfect --cube --key priority,state -a count -a sum,rss | recs-toptable --x priority,FIELD --y state -v sum_rss,count --pin state=run
+-----+--------+-----+-------+-----+-------+-----+--------+
|     |priority|0    |       |19   |       |ALL  |        |
+-----+--------+-----+-------+-----+-------+-----+--------+
|     |FIELD   |count|sum_rss|count|sum_rss|count|sum_rss |
+-----+--------+-----+-------+-----+-------+-----+--------+
|state|        |     |       |     |       |     |        |



( run in 0.635 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )