/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var FPS = 60; var gNumSamples = 500;
// This requires a gHost to have been created that provides host-specific // facilities. See eg spidermonkey.js.
var tests = new Map();
foreach_test_file(f => loadRelativeToScript(f)); for (const [name, info] of tests.entries()) { if ("enabled" in info && !info.enabled) {
tests.delete(name);
}
}
function report_results() { for (const result of gPerf.results) { const {
load,
elapsed_time,
mutating,
mutating_and_gc_fraction,
suspended,
full_time,
frames,
dropped_60fps_frames,
dropped_60fps_fraction,
minorGCs,
majorGCs,
} = result;
const drop_pct = percent(dropped_60fps_fraction); const mut_pct = percent(mutating_and_gc_fraction); const mut_sec = mutating.toFixed(2); const full_sec = full_time.toFixed(2); const susp_sec = suspended.toFixed(2);
print(`${load.name}:
${frames} (60fps) frames seen out of expected ${Math.floor(full_time * 60)}
${dropped_60fps_frames} = ${drop_pct} 60fps frames dropped
${mut_pct} of run spent mutating and GCing (${mut_sec}sec out of ${full_sec}sec vs ${susp_sec} sec waiting)
${minorGCs} minor GCs, ${majorGCs} major GCs
`);
}
}
var argparse = new ArgParser("JS shell microbenchmark runner");
argparse.add_argument(["--duration", "-d"], { default: gDefaultTestDuration,
help: "how long to run mutators for (in seconds)"
});
argparse.add_argument("--sched", { default: "keepup",
options: ["keepup", "vsync"],
help: "frame scheduler"
});
argparse.add_argument("--sequencer", { default: "cycle",
options: ["cycle", "find50"],
help: "mutator sequencer"
});
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.