NVIDIA DeepStream SDK API Reference

9.1 Release
service-maker/includes/lib/perf_monitor.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 namespace deepstream {
19 
20 class Element;
21 
22 
23 class PerfMonitor {
24  public:
34  PerfMonitor(unsigned int batch_size, uint64_t interval,
35  const std::string src_type, bool show_name=true
36  );
37 
38  virtual ~PerfMonitor();
39 
46  void apply(Element& element, const std::string&tips);
47 
51  void pause();
52 
56  void resume();
57 
61  void addStream(uint32_t source_id, const char* uri, const char* sensor_id, const char* sensor_name);
62 
66  void removeStream(uint32_t source_id);
67 
68  void print(void* info);
69 
70  protected:
71  unsigned int batch_size_;
72  uint64_t interval_sec_;
73  void* priv_;
74  void* fps_data_;
75 };
76 
77 }
deepstream::PerfMonitor::priv_
void * priv_
Definition: service-maker/includes/lib/perf_monitor.hpp:73
deepstream::Element
Element class definition.
Definition: service-maker/includes/element.hpp:54
deepstream::PerfMonitor::removeStream
void removeStream(uint32_t source_id)
Add a new stream.
deepstream::PerfMonitor::interval_sec_
uint64_t interval_sec_
Definition: service-maker/includes/lib/perf_monitor.hpp:72
deepstream::PerfMonitor::pause
void pause()
Pause the monitor.
deepstream
Definition: service-maker/includes/buffer.hpp:38
deepstream::PerfMonitor::fps_data_
void * fps_data_
Definition: service-maker/includes/lib/perf_monitor.hpp:74
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: service-maker/includes/lib/perf_monitor.hpp:71
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: service-maker/includes/lib/perf_monitor.hpp:23
deepstream::PerfMonitor::~PerfMonitor
virtual ~PerfMonitor()