Răsfoiți Sursa

修一个bug。

skyffire 1 an în urmă
părinte
comite
dbcf4ff441
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      global/src/trace_stack.rs

+ 3 - 3
global/src/trace_stack.rs

@@ -71,13 +71,13 @@ impl TraceStack {
             let now = Utc::now().timestamp_millis();
             if now - PREV_LOG_TIMESTAMP > 30 * 1000 {
                 PREV_LOG_TIMESTAMP = now;
-                info!("数据{}条, avg={}ns, {}条>10us, {}条>20us, {}条>200us, {}条>2000us",
+                info!("数据{}条, avg={}ns, {}条>10us, {}条>20us, {}条>200us, {}条>2000us, SUM={}",
                     COUNT, SUM_DELAY / COUNT,
-                    EXCEPTION_10_DELAY_COUNT, EXCEPTION_20_DELAY_COUNT, EXCEPTION_200_DELAY_COUNT, EXCEPTION_2000_DELAY_COUNT);
+                    EXCEPTION_10_DELAY_COUNT, EXCEPTION_20_DELAY_COUNT, EXCEPTION_200_DELAY_COUNT, EXCEPTION_2000_DELAY_COUNT, SUM_DELAY);
             }
 
             // 5000条清理一次
-            if COUNT % 5000 = 0 {
+            if COUNT % 5000 == 0 {
                 COUNT = 0;
                 SUM_DELAY = 0;
             }