MCPcopy Create free account
hub / github.com/tensorflow/tfjs / runBenchmarkFromFile

Function runBenchmarkFromFile

e2e/benchmarks/browserstack-benchmark/app.js:462–475  ·  view source on GitHub ↗

* Runs a benchmark with a preconfigured file * * @param file Relative filepath to preset benchmark configuration * @param runBenchmark Function to run a benchmark configuration

(file, runBenchmark = benchmarkAll)

Source from the content-addressed store, hash-verified

460 * @param runBenchmark Function to run a benchmark configuration
461 */
462async function runBenchmarkFromFile(file, runBenchmark = benchmarkAll) {
463 console.log('Running a preconfigured benchmark...');
464 const { benchmark, browsers } = file;
465 if (cliArgs?.period != null) {
466 benchmark.model = scheduleModels(benchmark.model, cliArgs.period, cliArgs.date);
467 console.log(
468 `\nWill benchmark the following models: \n\t` +
469 `${benchmark.model.join('\n\t')} \n`);
470 } else {
471 console.log(
472 `\nWill benchmark all models in '${cliArgs.benchmarks}'.\n`);
473 }
474 await runBenchmark(benchmark, browsers);
475}
476
477async function initializeWriting() {
478 if (cliArgs.firestore) {

Callers 2

prebenchmarkSetupFunction · 0.85
app_node_test.jsFile · 0.85

Calls 3

scheduleModelsFunction · 0.85
joinMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…