Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add json schema for output file generation #364

Merged
merged 8 commits into from
Jul 27, 2023
39 changes: 39 additions & 0 deletions src/c++/perf_analyzer/docs/examples/coupled_output_file.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"experiments": [
{
"experiment": {
"mode": "concurrency",
"value": 4
},
"requests": [
{
"timestamp": 1,
"sequence_id": 1,
"responses_timestamps": [
2
]
},
{
"timestamp": 5,
"sequence_id": 2,
"responses_timestamps": [
6
]
},
{
"timestamp": 7,
"sequence_id": 3,
"responses_timestamps": [
8
]
}
],
"window_boundaries": [
1,
5,
7
]
}
],
"version": "1.2.3"
}
41 changes: 41 additions & 0 deletions src/c++/perf_analyzer/docs/examples/decoupled_output_file.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
"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"
}
39 changes: 39 additions & 0 deletions src/c++/perf_analyzer/docs/examples/known_error_file.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"experiments": [
{
"experiment": {
"mode": "concurrency",
"value": 4
},
"requests": [
{
"timestamp": "This should be a number",
"sequence_id": 1,
"responses_timestamps": [
2
]
},
{
"timestamp": 5,
"sequence_id": 2,
"responses_timestamps": [
6
]
},
{
"timestamp": 7,
"sequence_id": 3,
"responses_timestamps": [
8
]
}
],
"window_boundaries": [
1,
5,
7
]
}
],
"version": "1.2.3"
}
96 changes: 96 additions & 0 deletions src/c++/perf_analyzer/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"$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.",
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
"type": "string"
},
"value": {
"description": "Concurrency or request rate for the current experiment.",
"type": "number"
}
}
},
"requests": {
"description": "The array of requests sent by perf_analyzer for this experiment.",
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
"type": "array",
"uniqueItems": true,
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
"items": {
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
"$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": "number"
matthewkotila marked this conversation as resolved.
Show resolved Hide resolved
},
"sequence_id": {
"description": "The sequence_id of the request.",
"type": "number"
},
"responses_timestamps": {
"description": "All associated responses to this request.",
"type": "array",
"items": {
"type": "number"
}
}
}
}
},
"window_boundaries": {
"description": "An array of time stamps describing window boundaries.",
"type": "array",
"items": {
"type": "number"
},
"uniqueItems": true
}
}
}
},
"version": {
"description": "The version of perf analyzer that generated the report.",
"type": "string"
}
}
}
Loading