修改告警

Signed-off-by: wwx1285007 <wanglu234@huawei.com>
This commit is contained in:
wwx1285007 2024-06-12 14:49:42 +08:00
parent b22c0b7cb7
commit c3dd6da207
2 changed files with 9 additions and 7 deletions

View File

@ -67,6 +67,7 @@ public:
void HelpCommand(CommandHelp type) const;
void HandleCommand(std::string argStr, const std::string &argStr1);
int GetItemInfo(std::multimap<std::string, std::string, decltype(SPUtils::Cmp) *> &spMap);
void printfExecCommand(const std::map<std::string, std::string> data);
// 采集次数
int num = 0;
// 包名

View File

@ -173,7 +173,6 @@ int SmartPerfCommand::GetItemInfo(std::multimap<std::string, std::string, declty
std::string SmartPerfCommand::ExecCommand()
{
LOGI("SmartPerfCommand::ExecCommand start num(%d)", num);
int rc = 0;
int index = 0;
bool callGpuCounterResult = false;
@ -210,14 +209,9 @@ std::string SmartPerfCommand::ExecCommand()
}
index++;
}
if (callGpuCounterResult) {
int i = 0;
const std::map<std::string, std::string> data = GpuCounter::GetInstance().ItemData();
for (auto a = data.cbegin(); a != data.cend(); ++a) {
printf("order:%d %s=%s\n", i++, a->first.c_str(), a->second.c_str());
}
printfExecCommand(data);
SPData spdata;
spdata.values.insert(data.begin(), data.end());
vmap.push_back(spdata);
@ -226,6 +220,13 @@ std::string SmartPerfCommand::ExecCommand()
SpCsvUtil::WriteCsv(std::string(outPath.c_str()), vmap);
return std::string("command exec finished!");
}
void SmartPerfCommand::printfExecCommand(const std::map<std::string, std::string> data)
{
int i = 0;
for (auto a = data.cbegin(); a != data.cend(); ++a) {
printf("order:%d %s=%s\n", i++, a->first.c_str(), a->second.c_str());
}
}
void SmartPerfCommand::InitSomething()
{