已开启
congestion事件限流 #1160
董洁创建于 8月4日
congestion事件限流 #1160
已开启
共 1 个文件变更+15-0
| @@ -145,6 +145,11 @@ void TaskBlockInfoReport(const long long passed, const std::string& task_label, | |||
| 145 | 145 | ||
| 146 | void TaskTimeoutReport(std::stringstream& ss, const std::string& processName, int tid, int qos) | 146 | void TaskTimeoutReport(std::stringstream& ss, const std::string& processName, int tid, int qos) |
| 147 | { | 147 | { |
| 148 | + static bool isReported = false; | ||
C | |||
| 149 | + if (isReported) { | ||
| 150 | + return; | ||
| 151 | + } | ||
| 152 | + isReported = true; | ||
| 148 | std::string msg = ss.str(); | 153 | std::string msg = ss.str(); |
| 149 | std::string eventName = "CONGESTION"; | 154 | std::string eventName = "CONGESTION"; |
| 150 | std::string senarioName = "Task_Sch_Timeout"; | 155 | std::string senarioName = "Task_Sch_Timeout"; |
| @@ -164,6 +169,11 @@ void TaskTimeoutReport(std::stringstream& ss, const std::string& processName, in | |||
| 164 | void QueueTaskTimeoutReport(std::stringstream& ss, const std::string& processName, | 169 | void QueueTaskTimeoutReport(std::stringstream& ss, const std::string& processName, |
| 165 | int tid, const std::string& qname, int qos) | 170 | int tid, const std::string& qname, int qos) |
| 166 | { | 171 | { |
| 172 | + static bool isReported = false; | ||
| 173 | + if (isReported) { | ||
| 174 | + return; | ||
| 175 | + } | ||
| 176 | + isReported = true; | ||
| 167 | std::string msg = ss.str(); | 177 | std::string msg = ss.str(); |
| 168 | std::string eventName = "CONGESTION"; | 178 | std::string eventName = "CONGESTION"; |
| 169 | std::string senarioName = "Serial_Queue_Timeout"; | 179 | std::string senarioName = "Serial_Queue_Timeout"; |
| @@ -194,6 +204,11 @@ void TrafficOverloadReport(std::stringstream& ss, const std::string& senarioName | |||
| 194 | 204 | ||
| 195 | void WorkerEscapeReport(const std::string& processName, int qos, size_t totalNum) | 205 | void WorkerEscapeReport(const std::string& processName, int qos, size_t totalNum) |
| 196 | { | 206 | { |
| 207 | + static bool isReported = false; | ||
| 208 | + if (isReported) { | ||
| 209 | + return; | ||
| 210 | + } | ||
| 211 | + isReported = true; | ||
| 197 | std::stringstream ss; | 212 | std::stringstream ss; |
| 198 | ss << "qos: " << qos << ", worker num: " << totalNum; | 213 | ss << "qos: " << qos << ", worker num: " << totalNum; |
| 199 | std::string msg = ss.str(); | 214 | std::string msg = ss.str(); |
pr的标题和描述写一下,不要用test