We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ea5ee56 + 6396fc4 commit d9fb708Copy full SHA for d9fb708
src/ConsumerStats.cxx
@@ -215,6 +215,9 @@ class ConsumerStats : public Consumer
215
216
counterBytesDiff = 0;
217
counterBlocksDiff = 0;
218
+
219
+ // ensure a minimum time between consecutive publish
220
+ usleep(10000);
221
}
222
223
// run a function in a separate thread to publish data regularly, until flag isShutdown is set
@@ -236,8 +239,6 @@ class ConsumerStats : public Consumer
236
239
if (timeUntilTimeout <= 0) {
237
240
publishStats();
238
241
monitoringUpdateTimer.increment(true);
- // ensure a minimum time between consecutive publish
- usleep(100000);
242
} else {
243
if (timeUntilTimeout > 1) {
244
timeUntilTimeout = 1.0; // avoid a sleep longer than 1s to allow exiting promptly
0 commit comments