[service] Add latency profiling support for single#667
Merged
jaeyun-jung merged 2 commits intonnstreamer:mainfrom Dec 3, 2025
Merged
[service] Add latency profiling support for single#667jaeyun-jung merged 2 commits intonnstreamer:mainfrom
jaeyun-jung merged 2 commits intonnstreamer:mainfrom
Conversation
- Let the ml service using single conf can set latency profiling option
Example:
```json
{ "single": { ... "profile": "true" } }
```
- To make it compatible with pipeline way `(... latency=1 ...)`,
key of "latency" and value of "1" will do the same thing.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
- Added "profile" and "latency" fields to those single service conf files Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
songgot
approved these changes
Nov 27, 2025
Contributor
songgot
left a comment
There was a problem hiding this comment.
You used 'profile' to add new profiling options.
I think this is a good design, as the profile field could potentially include various performance metrics, such as execution time, memory usage, CPU utilization, and function call frequency for each function/module.
However, if you only need latency measurements for now, unifying it to 'latency' might be a good option.
songgot
reviewed
Nov 27, 2025
| ml_tensors_data_cb invoke_async_cb; /**< Callback function to be called when the sub-plugin generates an output asynchronously. This is only available when invoke_async is set to TRUE. */ | ||
| void *invoke_async_pdata; /**< Private data to be passed to async callback. */ | ||
| void *invoke_async_pdata; /**< Private data to be passed to async callback. */ | ||
| int latency_mode; /**< 1 - log invoke latency, 0 (default) - do not log */ |
Contributor
There was a problem hiding this comment.
What do you think of this?
/**< 1: Enable latency log, 0 (default): Disable log */
jaeyun-jung
approved these changes
Nov 27, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example:
{ "single": { ... "profile": "true" } }(... latency=1 ...),... "latency" : "1"in the conf will do the sameREF: nnstreamer/nnstreamer#4806