You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by ww...@apache.org on 2022/08/01 02:15:53 UTC
[incubator-brpc] branch master updated: fix #1973 (#1863)
This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 65b5fcdb fix #1973 (#1863)
65b5fcdb is described below
commit 65b5fcdb2e74caeeae63a47f0674357ff4816efa
Author: HU <ue...@gmail.com>
AuthorDate: Mon Aug 1 10:15:44 2022 +0800
fix #1973 (#1863)
Co-authored-by: XiguoHu <hu...@baidu.com>
---
src/bvar/detail/sampler.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/bvar/detail/sampler.cpp b/src/bvar/detail/sampler.cpp
index 3a14b375..9887539f 100644
--- a/src/bvar/detail/sampler.cpp
+++ b/src/bvar/detail/sampler.cpp
@@ -17,6 +17,7 @@
// Date: Tue Jul 28 18:14:40 CST 2015
+#include <gflags/gflags.h>
#include "butil/time.h"
#include "butil/memory/singleton_on_pthread_once.h"
#include "bvar/reducer.h"
@@ -127,7 +128,11 @@ static PassiveStatus<double>* s_cumulated_time_bvar = NULL;
static bvar::PerSecond<bvar::PassiveStatus<double> >* s_sampling_thread_usage_bvar = NULL;
#endif
+DEFINE_int32(bvar_sampler_thread_start_delay_us, 10000, "bvar sampler thread start delay us");
+
void SamplerCollector::run() {
+ ::usleep(FLAGS_bvar_sampler_thread_start_delay_us);
+
#ifndef UNIT_TEST
// NOTE:
// * Following vars can't be created on thread's stack since this thread
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org