Skip to content

Commit

Permalink
Add trace test for C++ client (triton-inference-server#4216)
Browse files Browse the repository at this point in the history
* Fix documentation

* Add trace test for c++ client

* Address comment
  • Loading branch information
krishung5 authored Apr 16, 2022
1 parent 361380f commit e39d03b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/protocol/extension_trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ trace settings are defined:
trace output, resulting files in name "${trace_file}.0", "${trace_file}.1"...,
see trace setting "log frequency" below for detail.
- "trace_level" : the trace level. "OFF" to disable tracing,
TIMESTAMPS" to trace timestamps, "TENSORS" to trace tensors.
"TIMESTAMPS" to trace timestamps, "TENSORS" to trace tensors.
This value is an array of string whhere user may specify multiple levels to
trace multiple informations.
- "trace_rate" : the trace sampling rate. The value represents how many requests
Expand Down Expand Up @@ -130,7 +130,7 @@ $trace_setting_request =
```

The $trace_setting JSON is defined in
[Trace Setting Response JSON Object](#Trace-Setting-Response-JSON-bject), only the specified
[Trace Setting Response JSON Object](#Trace-Setting-Response-JSON-Object), only the specified
settings will be updated. In additon to the values mentioned in response JSON
object, JSON null value may be used to remove the specification of
the trace setting. In such case, the current global setting will be used.
Expand Down Expand Up @@ -191,7 +191,7 @@ message TraceSettingResponse
```

The trace settings are mentioned in
[Trace Setting Response JSON Object](#Trace-Setting-Response-JSON-bject).
[Trace Setting Response JSON Object](#Trace-Setting-Response-JSON-Object).
Note that if this is the first request to initalize
a model trace settings, for the trace settings that are not specified
in the request, the value will be copied from the current global settings.
2 changes: 1 addition & 1 deletion docs/trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ model run as part of an ensemble, the "parent_id" will indicate the
"id" of the containing ensemble.

Each `TIMESTAMPS` trace will have one or more "timestamps" with
each timestamp having a name and the timestamp innanoseconds ("ns").
each timestamp having a name and the timestamp in nanoseconds ("ns").
For example:

```
Expand Down
7 changes: 5 additions & 2 deletions qa/L0_grpc/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,12 @@ kill $SERVER_PID
wait $SERVER_PID

# Run cpp client unit test
rm -r ${MODELDIR}/* && cp -r $DATADIR/qa_model_repository/onnx_int32_int32_int32 ${MODELDIR}/.
rm -rf unit_test_models && mkdir unit_test_models
cp -r $DATADIR/qa_model_repository/onnx_int32_int32_int32 unit_test_models/.
cp -r ${MODELDIR}/simple unit_test_models/.

SERVER_ARGS="--backend-directory=${BACKEND_DIR} --model-repository=${MODELDIR}"
SERVER_ARGS="--backend-directory=${BACKEND_DIR} --model-repository=unit_test_models
--trace-file=global_unittest.log --trace-level=TIMESTAMPS --trace-rate=1"
SERVER_LOG="./inference_server_cc_unit_test.log"
CLIENT_LOG="./cc_unit_test.log"
run_server
Expand Down
7 changes: 5 additions & 2 deletions qa/L0_http/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,12 @@ kill $SERVER_PID
wait $SERVER_PID

# Run cpp client unit test
rm -r ${MODELDIR}/* && cp -r $DATADIR/qa_model_repository/onnx_int32_int32_int32 ${MODELDIR}/.
rm -rf unit_test_models && mkdir unit_test_models
cp -r $DATADIR/qa_model_repository/onnx_int32_int32_int32 unit_test_models/.
cp -r ${MODELDIR}/simple unit_test_models/.

SERVER_ARGS="--backend-directory=${BACKEND_DIR} --model-repository=${MODELDIR}"
SERVER_ARGS="--backend-directory=${BACKEND_DIR} --model-repository=unit_test_models
--trace-file=global_unittest.log --trace-level=TIMESTAMPS --trace-rate=1"
SERVER_LOG="./inference_server_cc_unit_test.log"
CLIENT_LOG="./cc_unit_test.log"
run_server
Expand Down

0 comments on commit e39d03b

Please sign in to comment.