From f300ba0b4f5fbfd472aebea6f3c85c0ae6532f34 Mon Sep 17 00:00:00 2001 From: fly_1997 Date: Thu, 13 Mar 2025 14:20:14 +0800 Subject: [PATCH] fix issues --- src/client/analysis/analysis_report.h | 4 ++-- src/client/analysis/config.cpp | 4 ++-- src/client/analysis/config.h | 4 ++-- .../collect/system/system_collector.cpp | 1 - .../tune/system/network/smc_tune/smc_tune.cpp | 19 ++++++++++--------- .../tune/system/network/smc_tune/smc_tune.h | 2 +- src/plugin/tune/system/system_tune.cpp | 3 --- 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/client/analysis/analysis_report.h b/src/client/analysis/analysis_report.h index 984c4e6..07b1831 100644 --- a/src/client/analysis/analysis_report.h +++ b/src/client/analysis/analysis_report.h @@ -29,8 +29,8 @@ struct AnalysisTemplate { struct TlbMissAnalysis { TlbMiss tlbMiss; int cnt = -1; // The first data is invalid. - int threshold1 = 5; - int threshold2 = 5; + double threshold1 = 5; + double threshold2 = 10; bool IsHighMiss(); void Add(const TlbMiss &tempTlbMiss); }; diff --git a/src/client/analysis/config.cpp b/src/client/analysis/config.cpp index 03298f2..5760b91 100644 --- a/src/client/analysis/config.cpp +++ b/src/client/analysis/config.cpp @@ -61,10 +61,10 @@ bool Config::Init(int argc, char **argv) showVerbose = true; break; case L1_MISS_THRESHOLD: - l1MissThreshold = atoi(optarg); + l1MissThreshold = atof(optarg); break; case L2_MISS_THRESHOLD: - l2MissThreshold = atoi(optarg); + l2MissThreshold = atof(optarg); break; case 'h': default: diff --git a/src/client/analysis/config.h b/src/client/analysis/config.h index 2a89f90..052d9e0 100644 --- a/src/client/analysis/config.h +++ b/src/client/analysis/config.h @@ -48,8 +48,8 @@ private: const int minAnalyzeTime = 1; const int maxAnalyzeTime = 100; int analysisTime = 30; // default 30s - int l1MissThreshold = 5; - int l2MissThreshold = 10; + double l1MissThreshold = 5; + double l2MissThreshold = 10; const std::string shortOptions = "t:hrv"; const std::vector