diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2020-08-14 15:19:19 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2020-08-14 15:19:19 +0900 |
commit | 042b262b3633b6c0f577aed6cb4b980ad0c1dcf3 (patch) | |
tree | e79fb9ffe65b21bdc5863306db2757ab187a3306 /runtime/onert/core/src/util/EventCollector.cc | |
parent | 05e0ec30a632339a8533082476f27bda31ccde16 (diff) | |
download | nnfw-042b262b3633b6c0f577aed6cb4b980ad0c1dcf3.tar.gz nnfw-042b262b3633b6c0f577aed6cb4b980ad0c1dcf3.tar.bz2 nnfw-042b262b3633b6c0f577aed6cb4b980ad0c1dcf3.zip |
Imported Upstream version 1.8.0upstream/1.8.0submit/tizen/20200814.062151
Diffstat (limited to 'runtime/onert/core/src/util/EventCollector.cc')
-rw-r--r-- | runtime/onert/core/src/util/EventCollector.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/onert/core/src/util/EventCollector.cc b/runtime/onert/core/src/util/EventCollector.cc index 9ecc7e3b8..de37276bf 100644 --- a/runtime/onert/core/src/util/EventCollector.cc +++ b/runtime/onert/core/src/util/EventCollector.cc @@ -54,7 +54,8 @@ private: std::string _ts; }; -void emit_rusage(EventRecorder *rec, const std::string &ts) +#ifdef DEBUG +inline void emit_rusage(EventRecorder *rec, const std::string &ts) { struct rusage ru; @@ -81,6 +82,7 @@ void emit_rusage(EventRecorder *rec, const std::string &ts) rec->emit(evt); } } +#endif } // namespace @@ -99,6 +101,9 @@ void EventCollector::onEvent(const Event &event) break; } - // Trace resource usage per each event notification +// TODO: Add resurece measurement(e.g. RSS) +// when ready with low overhead in release build +#ifdef DEBUG emit_rusage(_rec, ts); +#endif } |