PerlBench
view release on metacpan or search on metacpan
something that nicely formats the 'perlbench-runtests' results.
* The 'perlbench-timeit' script has grown some new options.
0.92 - 2005-12-19 Gisle Aas <gisle@ActiveState.com>
* Added new timing framework in the PerlBench module.
* Added script 'perlbench-timeit'.
* Renamed 'bench' as 'perlbench-run'.
* Moved old style benchmarks to the 'benchmarks' directory.
0.91 - 2005-12-15 Gisle Aas <gisle@ActiveState.com>
* More text on the HTML index. Use JavaScript popups.
0.90 - 2005-12-14 Gisle Aas <gisle@ActiveState.com>
* Rescaled test that ran too long on my current machine.
* Save result details in a directory with HTML index.
0.07 - 1999-04-05 Gisle Aas <gisle@aas.no>
* OS/2 patches by Ilya Zakharevich <ilya@math.ohio-state.edu>
* t/hash/set will not grow the hash as much. Got out of memory
problems.
if (typeof ol_fgclass=='undefined') var ol_fgclass="";
if (typeof ol_bgclass=='undefined') var ol_bgclass="";
if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";
if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";
if (typeof ol_closefontclass=='undefined') var ol_closefontclass="";
////////
// ARRAY CONFIGURATION
////////
// You can use these arrays to store popup text here instead of in the html.
if (typeof ol_texts=='undefined') var ol_texts = new Array("Text 0", "Text 1");
if (typeof ol_caps=='undefined') var ol_caps = new Array("Caption 0", "Caption 1");
////////
// END OF CONFIGURATION
// Don't change anything below this line, all configuration is above.
////////
if (!postParseChecks()) return false;
if (o3_delay == 0) {
return runHook("olMain", FREPLACE);
} else {
o3_delayid = setTimeout("runHook('olMain', FREPLACE)", o3_delay);
return false;
}
}
// Clears popups if appropriate
function nd(time) {
if (olLoaded && !isExclusive()) {
hideDelay(time); // delay popup close if time specified
if (o3_removecounter >= 1) { o3_showingsticky = 0 };
if (o3_showingsticky == 0) {
o3_allowmove = 0;
if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);
} else {
o3_removecounter++;
}
}
// This function decides what it is we want to display and how we want it done.
function olMain() {
var layerhtml, styleType;
runHook("olMain", FBEFORE);
if (o3_background!="" || o3_fullhtml) {
// Use background instead of box.
layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);
} else {
// They want a popup box.
styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass");
// Prepare popup background
if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\"";
if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground);
// Prepare popup colors
if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor);
if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor);
// Prepare popup height
if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height);
else o3_height = "";
// Decide which kinda box.
if (o3_cap=="") {
// Plain
layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);
} else {
// With caption
if (o3_sticky) {
// We want it to stick!
if (o3_sticky) {
if (o3_timerid > 0) {
clearTimeout(o3_timerid);
o3_timerid = 0;
}
o3_showingsticky = 1;
o3_removecounter = 0;
}
// Created a separate routine to generate the popup to make it easier
// to implement a plugin capability
if (!runHook("createPopup", FREPLACE, layerhtml)) return false;
// Prepare status bar
if (o3_autostatus > 0) {
o3_status = o3_text;
if (o3_autostatus > 1) o3_status = o3_cap;
}
// When placing the layer the first time, even stickies may be moved.
// Show layer
runHook("disp", FREPLACE, o3_status);
runHook("olMain", FAFTER);
return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != '');
}
////////
// LAYER GENERATION FUNCTIONS
////////
// These functions just handle popup content with tags that should adhere to the W3C standards specification.
// Makes simple table without caption
function ol_content_simple(text) {
var cpIsMultiple = /,/.test(o3_cellpad);
var txt = '<table width="'+o3_width+ '" border="0" cellpadding="'+o3_border+'" cellspacing="0" '+(o3_bgclass ? 'class="'+o3_bgclass+'"' : o3_bgcolor+' '+o3_height)+'><tr><td><table width="100%" border="0" '+((olNs4||!cpIsMultiple) ? 'cellpadding="'+...
set_background("");
return txt;
}
over.style.backgroundImage = "url("+pic+")";
}
}
}
////////
// HANDLING FUNCTIONS
////////
var olShowId=-1;
// Displays the popup
function disp(statustext) {
runHook("disp", FBEFORE);
if (o3_allowmove == 0) {
runHook("placeLayer", FREPLACE);
(olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over);
o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1;
}
runHook("disp", FAFTER);
if (statustext != "") self.status = statustext;
}
// Creates the actual popup structure
function createPopup(lyrContent){
runHook("createPopup", FBEFORE);
if (o3_wrap) {
var wd,ww,theObj = (olNs4 ? over : over.style);
theObj.top = theObj.left = ((olIe4&&!olOp) ? 0 : -10000) + (!olNs4 ? 'px' : 0);
layerWrite(lyrContent);
wd = (olNs4 ? over.clip.width : over.offsetWidth);
if (wd > (ww=windowWidth())) {
lyrContent=lyrContent.replace(/\ /g, ' ');
layerWrite(lyrContent);
// Have to set o3_width for placeLayer() routine if o3_wrap is turned on
if (o3_wrap) o3_width=(olNs4 ? over.clip.width : over.offsetWidth);
runHook("createPopup", FAFTER, lyrContent);
return true;
}
// Decides where we want the popup.
function placeLayer() {
var placeX, placeY, widthFix = 0;
// HORIZONTAL PLACEMENT, re-arranged to work in Safari
if (o3_frame.innerWidth) widthFix=18;
iwidth = windowWidth();
// Horizontal scroll offset
winoffset=(olIe4) ? eval('o3_frame.'+docRoot+'.scrollLeft') : o3_frame.pageXOffset;
// get Browser window width
function windowWidth() {
var w;
if (o3_frame.innerWidth) w=o3_frame.innerWidth;
else if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth'))
w=eval('o3_frame.'+docRoot+'.clientWidth');
return w;
}
// create the div container for popup content if it doesn't exist
function createDivContainer(id,frm,zValue) {
id = (id || 'overDiv'), frm = (frm || o3_frame), zValue = (zValue || 1000);
var objRef, divContainer = layerReference(id);
if (divContainer == null) {
if (olNs4) {
divContainer = frm.document.layers[id] = new Layer(window.innerWidth, frm);
objRef = divContainer;
} else {
var body = (olIe4 ? frm.document.all.tags('BODY')[0] : frm.document.getElementsByTagName("BODY")[0]);
perlbench-run view on Meta::CPAN
next;
}
my $res_file = "$dir/$name/" . $p->{label} . ".txt";
mkpath(dirname($res_file), 0, 0755);
open(RES, ">$res_file") || die "Can't create $res_file: $!";
(my $res_file_link = $res_file) =~ s,^\Q$dir\E/,,;
$res_file_link = htmlesc($res_file_link);
my $points;
my $popup_text = "";
$p->run_cmd(*P, $test, $factor, $p->{empty_cycles});
while (<P>) {
print RES $_;
if (/^Bench-Points:\s+(\S+)/) {
$points = $1;
}
if (/^(?:\w+-Time|CPU|Cycles-Per-Sec|Loop-Overhead):/) {
$popup_text .= "<br>" if length($popup_text);
$popup_text .= $_;
chomp($popup_text);
}
}
close(P);
close(RES);
my $overlib_attr = "";
if ($use_overlib) {
$overlib_attr = qq( onmouseover="return overlib('$popup_text');" onmouseout="return nd();");
}
# present results
unless (defined $points) {
printf "%8s", "-";
print INDEX qq( <td><a href="$res_file_link"$overlib_attr>??</a></td>\n);
next;
}
unless ($opt_s) {
unless (defined $scale) {
( run in 2.505 seconds using v1.01-cache-2.11-cpan-364913b4093 )