File: csv_rx-pm.pl.in

package info (click to toggle)
modsecurity-apache 2.9.7-1%2Bdeb12u1
  • links: PTS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 10,440 kB
  • sloc: ansic: 51,935; sh: 4,516; perl: 2,340; cpp: 1,930; makefile: 620; xml: 6
file content (21 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!@PERL@
#
# Example to generate CSV performance data from test results taken from
# test generated by gen_rx-pm.pl.
#
use strict;

my %H = ();
while (<>) {
	chomp;
	my ($op, $label, $n, $i, $value) = (m/\s*\d+\)\s+\S+\s+"([^"]*)"\s+(\S+)\s+(\d+) item\(s\): passed\s+\((\d+)\s+\@\s+([-\+\d\.E]+) msec\s.*/);

	next unless defined($value);
	$H{$n}{$label} = $value;

}

printf "%s, %s, %s, %s\n", qw(N rx1 rx2 pm1);
for (sort {$a <=> $b} keys %H) {
	printf "%s, %s, %s, %s\n", $_, $H{$_}{rx1}, $H{$_}{rx2}, $H{$_}{pm1}
};