itertest
v1.0.0
Published
cli tool to quickly build html charts using Plotly.js from json files
Maintainers
Readme
Itertest
cli tool to quickly build html charts using Plotly.js from json files
Recursively walks through provided JSON, plotting all values if:
- custom parser provide for value
- value is a number
- value exists in custom-config if parseCustomConfigKeysOnly == true
Installation
npm i itertest
Quickstart
Select or initialize a new test
itertest select <test-name> [custom-config]Add iterations to the test
itertest add <path-to-json-file>Graphs are generated after each add. Optionally you can regenerate the graph
itertest generateCommands
- select
<test-name>[custom-config-file-path]'selects or initializes a new test
<test-name>name of test. Once selected, calls toaddwill add iterations to this test- [custom-config-file-path] optional ts/js file containing custom settings for keys in your test iteration json
- Example:
- Iteration json:
{ "request-rate": "10/s" } - Custom config
module.exports = { default: { "request-rate": { // Parser MUST return a number parser: (value) => Number(value.split("/s")[0]), title: "Request Rate", graphType: "bar", // Plotlyjs data.type graphMode: "group", // Plotlyjs data.mode groupName: "group-name", // Will group keys with same group-name on graphs graphColor: "#000000" // Plotted line, bar, etc. color } } options: { parseCustomConfigKeysOnly: true | false // If true, only keys in default export will be graphed } }
- Iteration json:
- Example:
- list
List all tests found in your itertest installation
- iterations
List iterations of the currently selected test
- config
Prints itertest's current config
- add
<path-to-iteration-json>Adds an iteration to the currently selected test
- generate
Generates plotly.js html file (path printed to console) of test iterations
- print
[search>]Prints json data of all iterations matching search (prints all if no search provided) of the currently selected test
- delete
<search>Delete all iterations matching search of the currently selected test
- help
Prints itertest commands
