File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,12 @@ O2_GENERATE_EXECUTABLE(
168168 BUCKET_NAME ${BUCKET_NAME}
169169)
170170
171+ O2_GENERATE_EXECUTABLE(
172+ EXE_NAME testMonitor.exe
173+ SOURCES src/testMonitor.cxx
174+ BUCKET_NAME ${BUCKET_NAME}
175+ )
176+
171177# Install some extra files
172178install (
173179 FILES readout.cfg
Original file line number Diff line number Diff line change 1+ // simple test program used to evaluate overhead of monitoring lib
2+
3+ #include < stdint.h>
4+ #include < stdio.h>
5+
6+ #include < Monitoring/MonitoringFactory.h>
7+ using namespace o2 ::monitoring;
8+
9+ int main () {
10+
11+ std::unique_ptr<Monitoring> monitoringCollector;
12+ monitoringCollector=MonitoringFactory::Get (" influxdb-udp://aido2mon-gpn.cern.ch:8088" );
13+ monitoringCollector->enableProcessMonitoring (1 );
14+
15+ uint64_t bytesTotal=0 ;
16+
17+ for (;;){
18+ bytesTotal+=1000000000 ;
19+ monitoringCollector->send ({bytesTotal, " readout.BytesTotal" });
20+ monitoringCollector->send ({bytesTotal, " readout.BytesTotal" }, DerivedMetricMode::RATE);
21+ printf (" ." );
22+ fflush (stdout);
23+ sleep (1 );
24+ }
25+
26+ return 0 ;
27+ }
You can’t perform that action at this time.
0 commit comments