mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-18 22:01:54 +02:00
m1/perf/favg: tool to extract values from ./tabulate -h and to calculate averages
This commit is contained in:
parent
3da0074896
commit
71cdeb80df
19
m1/perf/favg
Executable file
19
m1/perf/favg
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
$sel = $ARGV[0];
|
||||||
|
shift @ARGV;
|
||||||
|
for (@ARGV) {
|
||||||
|
$s = 0;
|
||||||
|
$n = 0;
|
||||||
|
open(FILE, $_) || die "$_: $!";
|
||||||
|
while (<FILE>) {
|
||||||
|
$c = 0 if /<TR>/;
|
||||||
|
if (/<TD[^>]*>([0-9.]+)/ ) {
|
||||||
|
$c++;
|
||||||
|
next unless $c == $sel;
|
||||||
|
$s += $1;
|
||||||
|
$n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close FILE;
|
||||||
|
print "$s/$n = ", $s/$n, "\n";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user