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/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new a7dfbea9 Bugfix: LatencyRecorder::expose CHECK fails when save_series 
flag is false (#3022)
a7dfbea9 is described below

commit a7dfbea910ce9566feeb38d0e417f518966d3a4c
Author: Bright Chen <[email protected]>
AuthorDate: Fri Jul 11 11:18:52 2025 +0800

    Bugfix: LatencyRecorder::expose CHECK fails when save_series flag is false 
(#3022)
---
 src/bvar/latency_recorder.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/bvar/latency_recorder.cpp b/src/bvar/latency_recorder.cpp
index b4ba0c44..f70894ae 100644
--- a/src/bvar/latency_recorder.cpp
+++ b/src/bvar/latency_recorder.cpp
@@ -253,10 +253,12 @@ int LatencyRecorder::expose(const butil::StringPiece& 
prefix1,
     if (_latency_percentiles.expose_as(prefix, "latency_percentiles", 
DISPLAY_ON_HTML) != 0) {
         return -1;
     }
-    snprintf(namebuf, sizeof(namebuf), "%d%%,%d%%,%d%%,99.9%%",
-             (int)FLAGS_bvar_latency_p1, (int)FLAGS_bvar_latency_p2,
-             (int)FLAGS_bvar_latency_p3);
-    CHECK_EQ(0, _latency_percentiles.set_vector_names(namebuf));
+    if (FLAGS_save_series) {
+        snprintf(namebuf, sizeof(namebuf), "%d%%,%d%%,%d%%,99.9%%",
+                 (int)FLAGS_bvar_latency_p1, (int)FLAGS_bvar_latency_p2,
+                 (int)FLAGS_bvar_latency_p3);
+        CHECK_EQ(0, _latency_percentiles.set_vector_names(namebuf));
+    }
     return 0;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to