-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report TableBench output as another performance benchmark to Kusto (#…
…22225) #### Description [AB#8399](https://dev.azure.com/fluidframework/internal/_workitems/edit/7831/) - Update the TableBench tests to run benchmarks with custom outputs instead of execution time benchmarks (replacing `it()` by `benchmarkCustom()`) - Adds a new mocha configuration in `examples/benchmarks/tablebench` package and update `.gitignore`. - Removes `--perfmode` in `packages/dds/tree`. Running `npm run test:customBenchmarks` displays the output of custom benchmark test. <img width="1096" alt="Screenshot 2024-08-15 at 17 28 18" src="https://github.com/user-attachments/assets/297ae71e-2157-48e5-aeaf-a521677ba885"> <img width="785" alt="Screenshot 2024-08-15 at 17 28 33" src="https://github.com/user-attachments/assets/901e649e-8249-4e99-b836-5082c0c68ffb"> #### Follow-up Items - Make sure to run custom benchmarks test on pipeline (#22204) - Fix a bug with `customBenchmark()` function which was determined while working on this task. - https://dev.azure.com/fluidframework/internal/_workitems/edit/12925
- Loading branch information
1 parent
83c8b37
commit 1850c61
Showing
5 changed files
with
104 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
examples/benchmarks/tablebench/.mocharc.customBenchmarks.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* Mocha configuration file to run memory-profiling tests | ||
*/ | ||
"use strict"; | ||
|
||
const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common"); | ||
|
||
const packageDir = __dirname; | ||
const baseConfig = getFluidTestMochaConfig(packageDir); | ||
|
||
const nodeOptions = | ||
baseConfig["node-option"] !== undefined | ||
? Array.isArray(baseConfig["node-option"]) | ||
? baseConfig["node-option"] | ||
: [baseConfig["node-option"]] // If string, wrap as array to use spread operator | ||
: []; // If undefined, use an empty array | ||
|
||
nodeOptions.push("expose-gc", "gc-global", "unhandled-rejections=strict"); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
"fgrep": ["@CustomBenchmark"], | ||
"node-option": nodeOptions, // without leading "--" | ||
"recursive": true, | ||
"reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", | ||
"reporterOptions": ["reportDir=.customBenchmarksOutput/"], | ||
"spec": ["lib/test/**/*.*js"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters