filebench_compare.pl revision f2fc321be9b4df7748e8c31a5edd154b0177b139
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
#
# Compare filebench results
#
# Usage: filebench_summary <dir1> <dir2> ...
#
use CGI ':standard';
$maxiopsoverall = 0;
$maxiopsrate = 0;
$maxbandwidth = 0;
#
# Create html and text
#
open (HTML, ">index.html");
print HTML "<body>";
#
# Print aggregate flowop stats
#
printf ("Generating html for $dir\n");
open (PROFILE, "<$dir/thisrun.prof");
$description = <PROFILE>;
print "file = $file\n";
$dataset =~ s/.*\/(.+)$/$1/;
$dataset =~ s/\/$//;
# print "dataset = $dataset\n";
# print "workload = $workload\n";
# print "fstype = $fstype\n";
while (<STATS>) {
if (/^$/) {
last;
}
# Collapse shadow reads into single metric
if ($flowop =~ /shadowread/) {
$flowop = "shadow-read";
}
# Collapse database writes into single metric
$flowop = "db-write";
}
# Collapse database writes into single metric
$flowop = "db-write";
}
}
close(STATS);
}
}
# HTML IOPS
print HTML "<table border=1>";
print HTML "<b><td>Workload</td>";
print HTML "<td>$desc{$dataset}</td>";
}
print HTML "</b></tr>";
print HTML "<b><tr><td>$workload</td>";
$last = 0;
$color = "white";
$color = "red";
}
$color = "green";
}
}
print HTML "</b></tr>";
}
print HTML "</table>";
# HTML Bandwidth
print HTML "<table border=1>";
print HTML "<td>Workload</td>";
print HTML "<td>$desc{$dataset}</td>";
}
print HTML "</tr>";
$bandwidth = 0;
}
next if ($bandwidth == 0);
print HTML "<tr><td>$workload</td>";
}
print HTML "</tr>";
}
print HTML "</table>";
# HTML Latency
print HTML "<table border=1>";
print HTML "<td>Workload</td>";
print HTML "<td>$desc{$dataset}</td>";
}
print HTML "</tr>";
print HTML "<tr><td>$workload</td>";
} else {
printf HTML ("<td></td>");
}
}
print HTML "</tr>";
foreach $flowop (keys %wkl_flowops) {
next if ("$wkl_workload{$flowop}" ne "$workload");
print HTML "<tr><td><i>__$wkl_flowops{$flowop}</td>";
} else {
printf HTML ("<td></td>");
}
}
print HTML "</i></tr>";
}
}
print HTML "</table>";
# HTML Efficiency
print HTML "<table border=1>";
print HTML "<td>Workload</td>";
print HTML "<td>$desc{$dataset}</td>";
}
print HTML "</tr>";
print HTML "<tr><td>$workload</td>";
} else {
printf HTML ("<td></td>");
}
}
print HTML "</tr>";
foreach $flowop (keys %wkl_flowops) {
next if ("$wkl_workload{$flowop}" ne "$workload");
print HTML "<tr><td><i>__$wkl_flowops{$flowop}</td>";
} else {
printf HTML ("<td></td>");
}
}
print HTML "</i></tr>";
}
}
print HTML "</table>";
end_html();