-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add json schema for output file generation (#364)
* Add json schema for output file and examples * Add newlines at end of files * Update json type to correct keyword * Update schema to fix hierarchy and address feedback * Add json file with known error for testing * Move example files to the docs directory * Remove some example json files * Update schema to use integer and remove uniqueness from timestamps
- Loading branch information
1 parent
fc90bdd
commit d663f94
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/c++/perf_analyzer/docs/examples/decoupled_output_file.json
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,41 @@ | ||
{ | ||
"experiments": [ | ||
{ | ||
"experiment": { | ||
"mode": "concurrency", | ||
"value": 4 | ||
}, | ||
"requests": [ | ||
{ | ||
"timestamp": 1, | ||
"sequence_id": 1, | ||
"responses_timestamps": [ | ||
2, | ||
3, | ||
4 | ||
] | ||
}, | ||
{ | ||
"timestamp": 5, | ||
"sequence_id": 2, | ||
"responses_timestamps": [] | ||
}, | ||
{ | ||
"timestamp": 6, | ||
"sequence_id": 2, | ||
"responses_timestamps": [ | ||
7, | ||
8, | ||
9 | ||
] | ||
} | ||
], | ||
"window_boundaries": [ | ||
1, | ||
5, | ||
6 | ||
] | ||
} | ||
], | ||
"version": "1.2.3" | ||
} |
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,95 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/triton-inference-server/client/blob/main/src/c%2B%2B/perf_analyzer/examples/schema.json", | ||
"title": "Perf Analyzer output data", | ||
"description": "A json file describing the output from a Perf Analyzer run.", | ||
"type": "object", | ||
"required": [ | ||
"experiments", | ||
"version" | ||
], | ||
"properties": { | ||
"experiments": { | ||
"description": "The array of all experiments run by Perf Analyzer.", | ||
"type": "array", | ||
"required": [ | ||
"experiment", | ||
"requests", | ||
"window_boundaries" | ||
], | ||
"minItems": 1, | ||
"uniqueItems": true, | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"experiment": { | ||
"description": "A single experiment run by Perf Analyzer.", | ||
"type": "object", | ||
"required": [ | ||
"mode", | ||
"value" | ||
], | ||
"minItems": 1, | ||
"maxItems": 1, | ||
"properties": { | ||
"mode": { | ||
"description": "Operating mode of Perf Analyzer: For example, 'concurrency' or 'request rate'.", | ||
"type": "string" | ||
}, | ||
"value": { | ||
"description": "Concurrency or request rate for the current experiment.", | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"requests": { | ||
"description": "The array of requests sent by Perf Analyzer for this experiment.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/properties/experiments/items/properties/$defs/request" | ||
} | ||
}, | ||
"$defs": { | ||
"request": { | ||
"description": "Info for a single request.", | ||
"type": "object", | ||
"required": [ | ||
"timestamp", | ||
"responses_timestamps" | ||
], | ||
"properties": { | ||
"timestamp": { | ||
"description": "Time stamp of the request.", | ||
"type": "integer" | ||
}, | ||
"sequence_id": { | ||
"description": "The sequence_id of the request.", | ||
"type": "integer" | ||
}, | ||
"responses_timestamps": { | ||
"description": "All associated responses to this request.", | ||
"type": "array", | ||
"items": { | ||
"type": "integer" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"window_boundaries": { | ||
"description": "An array of time stamps describing window boundaries.", | ||
"type": "array", | ||
"items": { | ||
"type": "integer" | ||
}, | ||
"uniqueItems": true | ||
} | ||
} | ||
} | ||
}, | ||
"version": { | ||
"description": "The version of Perf Analyzer that generated the report.", | ||
"type": "string" | ||
} | ||
} | ||
} |