-
Notifications
You must be signed in to change notification settings - Fork 1
Example: Hello World
Elliott Ridgway edited this page May 25, 2021
·
1 revision
{
"plots" : {
"files" : {
"fileName": "performance_*",
"type" : "json"
},
"plot" : [
{
"name" : "My First Plot",
"dataLines" : [
{
"name" : "My First Data Line",
"x" : {
"getPath": "performance-report/nightly_run_*",
"getKey" : "date",
"unit" : "date"
},
"y" : {
"getPath": "performance-report/nightly_run_*/measurement",
"getKey" : "value",
"unit" : "seconds"
}
}
]
}
]
}
}
{
"performance-report" : {
"nightly_run_2021-04-05" : {
"date" : "2021-04-05T22:21:21",
"measurement": {
"value":"1.0"
}
}
}
}
- Locate the x data point
- at the specified path in the JSON (
"getPath": "performance-report/nightly_run_*"
) - with the specified key (
"getKey" : "date"
) - The X value will be located within the "date" attribute.
- Locate the y data point
- at the specified path in the JSON (
"getPath": "performance-report/nightly_run_*/measurement"
) - with the specified key (
"getKey" : "value"
) - The Y value will be located within the "value" attribute. (
"getKey" : "value"
).
- A single point
x="2021-04-05T22:21:21", y="1.0"
will be extracted from the XML. - Finally, Watchr will plot a single 2D scatter plot graph, with the X axis "date" and the Y axis "seconds" (as dictated by the
unit
fields). The single pointx="2021-04-05T22:21:21", y="1.0"
will be plotted.
watchr config.json performance_day_1.json