e2a1aa0229
Bumps and [cross-spawn](https://github.com/moxystudio/node-cross-spawn). These dependencies needed to be updated together. Updates `cross-spawn` from 6.0.5 to 7.0.6 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's changelog</a>.</em></p> <blockquote> <h3><a href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.5...v7.0.6">7.0.6</a> (2024-11-18)</h3> <h3>Bug Fixes</h3> <ul> <li>update cross-spawn version to 7.0.5 in package-lock.json (<a href=" |
||
---|---|---|
.. | ||
bin | ||
src | ||
.eslintrc.cjs | ||
.mocharc.cjs | ||
LICENSE | ||
README.md | ||
package-lock.json | ||
package.json | ||
prettier.config.cjs | ||
tsconfig.json |
README.md
@fluid-tools/telemetry-generator
Internal tool to take JSON files and generate custom telemetry events based on the data in them. Used, for example, to process the output of our performance tests and write relevant metrics to our monitoring systems.
Running the tool
Install dependencies and build the project:
npm i
npm run build
This tool leverages oclif. To run it manually, you need to call oclif's run
script in the bin
folder, like so:
node bin/run <arguments to the tool>
The start
npm script can be used as an alternative to node bin/run
, with an extra separator for the arguments, like
so:
npm run start -- <arguments to the tool>
The tool has two required arguments:
--dir
: the path(s) to one or more folders which contain the JSON files to be processed--handlerModule
: the absolute path to a JavaScript file that exports a handler function which can process those JSON files. Relative paths are technically supported but you might need a good understanding of Node's module resolution to use them successfully. In short, a relative path will be resolved from the location of the executing file at runtime, and which file that is is not obvious when we're using OCLIF.
Run node bin/run --help
for details on the arguments.
Processing the Fluid Framework performance tests
When this tool is used to process our performance tests, the folders should contain files generated by the
@fluid-tools/benchmark
tool, and the handlers defined here can be used to process them.
Make sure to use the correct type of handler (execution time / memory usage) for the output files you want to process.
Only one type of file can be processed during a single run of this tool.
Handling custom files
If you want to process your own JSON files with this tool you just need to pass a custom handler to it. See the handler template for details on how that file should look like. Then call the tool as usual, e.g.:
node bin/run --handlerModule /absolute/path/to/your/handler.js --dir /path/to/your/files