mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
修改告警
Signed-off-by: wwx1285007 <wanglu234@huawei.com>
This commit is contained in:
parent
b22c0b7cb7
commit
c3dd6da207
@ -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;
|
||||
// 包名
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user