summaryrefslogtreecommitdiff
path: root/shaping/src/shaper_stat.cpp
diff options
context:
space:
mode:
authorroot <[email protected]>2023-10-17 09:16:25 +0000
committerroot <[email protected]>2023-10-17 09:16:25 +0000
commitfc96d258c56ba5e48f5d6307ea7680cb77db82eb (patch)
tree4c5ce57821a2d3345eb2c14000dcb67ec7cb5710 /shaping/src/shaper_stat.cpp
parent32d1ede9d57af683c942d5ab0ecd41b66a1efd56 (diff)
TSG-15374: enable jemalloc backgroud gc thread
Diffstat (limited to 'shaping/src/shaper_stat.cpp')
-rw-r--r--shaping/src/shaper_stat.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/shaping/src/shaper_stat.cpp b/shaping/src/shaper_stat.cpp
index 6ede233..ef0cc75 100644
--- a/shaping/src/shaper_stat.cpp
+++ b/shaping/src/shaper_stat.cpp
@@ -15,7 +15,7 @@
#define SHAPER_STAT_ROW_NAME "traffic_shaping_rule_hits"
-#define SHAPER_STAT_REFRESH_TIME_NS 200000000 //0.2s
+#define SHAPER_STAT_REFRESH_TIME_NS 500000000 //0.5s
struct shaper_stat_conf {
int enable_backgroud_thread;
@@ -205,7 +205,6 @@ void shaper_stat_refresh(struct shaping_thread_ctx *ctx, struct shaping_flow *sf
clock_gettime(CLOCK_MONOTONIC, &curr_time);
if (curr_time.tv_sec - sf->stat_update_time.tv_sec > 0 || curr_time.tv_nsec - sf->stat_update_time.tv_nsec > SHAPER_STAT_REFRESH_TIME_NS) {
need_refresh = 1;
- sf->stat_update_time = curr_time;
memcpy(&sf->stat_update_time, &curr_time, sizeof(struct timespec));
}
}