NVIDIA DeepStream SDK API Reference

8.0 Release
perf_monitor.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 namespace deepstream {
14 
15 class Element;
16 
17 
18 class PerfMonitor {
19  public:
29  PerfMonitor(unsigned int batch_size, uint64_t interval,
30  const std::string src_type, bool show_name=true
31  );
32 
33  virtual ~PerfMonitor();
34 
41  void apply(Element& element, const std::string&tips);
42 
46  void pause();
47 
51  void resume();
52 
56  void addStream(uint32_t source_id, const char* uri, const char* sensor_id, const char* sensor_name);
57 
61  void removeStream(uint32_t source_id);
62 
63  void print(void* info);
64 
65  protected:
66  unsigned int batch_size_;
67  uint64_t interval_sec_;
68  void* priv_;
69  void* fps_data_;
70 };
71 
72 }
deepstream::Element
Element class definition.
Definition: element.hpp:49
deepstream::PerfMonitor::removeStream
void removeStream(uint32_t source_id)
Add a new stream.
deepstream::PerfMonitor::interval_sec_
uint64_t interval_sec_
Definition: perf_monitor.hpp:67
deepstream::PerfMonitor::priv_
void * priv_
Definition: perf_monitor.hpp:68
deepstream::PerfMonitor::pause
void pause()
Pause the monitor.
deepstream
Definition: buffer.hpp:33
deepstream::PerfMonitor::PerfMonitor
PerfMonitor(unsigned int batch_size, uint64_t interval, const std::string src_type, bool show_name=true)
constructor for a performance monitor instance
deepstream::PerfMonitor::apply
void apply(Element &element, const std::string &tips)
Apply the performance monitory on an element.
deepstream::PerfMonitor::batch_size_
unsigned int batch_size_
Definition: perf_monitor.hpp:66
deepstream::PerfMonitor::resume
void resume()
Resume the monitor.
deepstream::PerfMonitor::addStream
void addStream(uint32_t source_id, const char *uri, const char *sensor_id, const char *sensor_name)
Add a new stream.
deepstream::PerfMonitor::print
void print(void *info)
deepstream::PerfMonitor
Definition: perf_monitor.hpp:18
deepstream::PerfMonitor::~PerfMonitor
virtual ~PerfMonitor()
deepstream::PerfMonitor::fps_data_
void * fps_data_
Definition: perf_monitor.hpp:69