summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <[email protected]>2024-01-03 10:08:11 +0000
committerroot <[email protected]>2024-01-03 10:08:11 +0000
commitbd138432738b573731aa8c92653a2b2dc204f1dd (patch)
treed010b00580a8a433543fd84180d8472efeaa73c8
parenta12eedd985ca300bb0b4654c4f6b985692984dc8 (diff)
TSG-17993, TSG-18224, TSG-18230: 提高优先级信息刷新频率到每秒100次
-rw-r--r--shaping/src/shaper.cpp4
-rw-r--r--shaping/src/shaper_stat.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/shaping/src/shaper.cpp b/shaping/src/shaper.cpp
index 4ebc436..be68ca3 100644
--- a/shaping/src/shaper.cpp
+++ b/shaping/src/shaper.cpp
@@ -25,7 +25,7 @@ extern "C" {
#define TOKEN_ENLARGE_TIMES 10
#define TOKEN_GET_FAILED_INTERVAL_MS 1
-#define HMGET_REQUEST_INTERVAL_MS 1000
+#define HMGET_REQUEST_INTERVAL_MS 10
#define SWARMKV_QUEUE_LEN_GET_CMD_PRIORITY_1 "HMGET tsg-shaping-%d priority-0"
#define SWARMKV_QUEUE_LEN_GET_CMD_PRIORITY_2 SWARMKV_QUEUE_LEN_GET_CMD_PRIORITY_1 " priority-1"
@@ -657,7 +657,7 @@ static int shaper_profile_is_priority_blocked(struct shaping_thread_ctx *ctx, st
return 0;
}
- if (curr_time_ms - profile->hash_node->last_hmget_ms[priority] < HMGET_REQUEST_INTERVAL_MS) {//don't send hmget command in 1s
+ if (curr_time_ms - profile->hash_node->last_hmget_ms[priority] < HMGET_REQUEST_INTERVAL_MS) {//don't send hmget command in 10 ms
goto END;
}
diff --git a/shaping/src/shaper_stat.cpp b/shaping/src/shaper_stat.cpp
index d8895fa..db5b5f7 100644
--- a/shaping/src/shaper_stat.cpp
+++ b/shaping/src/shaper_stat.cpp
@@ -14,7 +14,7 @@
#define SHAPER_STAT_ROW_NAME "traffic_shaping_rule_hits"
-#define SHAPER_STAT_REFRESH_TIME_NS 100000000 //0.1s
+#define SHAPER_STAT_REFRESH_TIME_NS 10000000 //10 ms
struct shaper_stat_conf {
int enable_backgroud_thread;