Home | History | Annotate | Download | only in benchmarks

Lines Matching defs:Benchmark

29 // Simple framework for running the benchmark suites and
33 // A benchmark has a name (string) and a function that will be run to
36 // running the benchmark, but the running time of these functions will
37 // not be accounted for in the benchmark score.
38 function Benchmark(name, run, setup, tearDown) {
46 // Benchmark results hold the benchmark and the measured time used to
47 // run the benchmark. The benchmark score is computed later once a
48 // full benchmark suite has run to completion.
49 function BenchmarkResult(benchmark, time) {
50 this.benchmark = benchmark;
74 // Keep track of all declared benchmark suites.
80 // a new benchmark or change an existing one.
84 // To make the benchmark results predictable, we replace Math.random
101 // Runs all registered benchmark suites and optionally yields between
102 // each individual benchmark to avoid running for too long in the
167 // Notifies the runner that we're done running a single benchmark in
168 // the benchmark suite. This can be useful to report progress.
171 if (this.runner.NotifyStep) this.runner.NotifyStep(result.benchmark.name);
188 // Notifies the runner that running a benchmark resulted in an error.
199 // Runs a single benchmark for at least a second and computes the
201 BenchmarkSuite.prototype.RunSingleBenchmark = function(benchmark, data) {
206 benchmark.run();
216 // Measure the benchmark once for warm up and throw the result
225 this.NotifyStep(new BenchmarkResult(benchmark, usec));
232 // individual benchmark in the suite and returns a continuation
233 // function which can be invoked to run the next benchmark. Once the
234 // last benchmark has been executed, null is returned.
243 // Run the setup, the actual benchmark, and the tear down in three
268 // If data is null, we're done with this benchmark.