mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2025-02-17 01:09:22 +00:00
!1172 hisysevent插件抓取支持对domain和event过滤
Merge pull request !1172 from 集川/master
This commit is contained in:
commit
bcb905f5c8
@ -58,7 +58,8 @@ int HisyseventPlugin::Start(const uint8_t* configData, uint32_t configSize)
|
||||
CHECK_TRUE(protoConfig_.ParseFromArray(configData, configSize) > 0, -1,
|
||||
"NOTE HisyseventPlugin: ParseFromArray failed");
|
||||
|
||||
HILOG_DEBUG(LOG_CORE, "NOTE configData ParseFromArray sucessed,sourse data:%s", protoConfig_.msg().c_str());
|
||||
HILOG_DEBUG(LOG_CORE, "config sourse data:%s domain:%s event:%s", protoConfig_.msg().c_str(),
|
||||
protoConfig_.subscribe_domain().c_str(), protoConfig_.subscribe_event().c_str());
|
||||
|
||||
CHECK_TRUE(InitHisyseventCmd(), -1, "HisyseventPlugin: Init HisyseventCmd failed");
|
||||
|
||||
@ -181,6 +182,14 @@ inline bool HisyseventPlugin::InitHisyseventCmd()
|
||||
fullCmd_.emplace_back("hisysevent"); // exe file name
|
||||
fullCmd_.emplace_back("-rd");
|
||||
|
||||
if (!protoConfig_.subscribe_domain().empty()) {
|
||||
fullCmd_.emplace_back("-o");
|
||||
fullCmd_.emplace_back(protoConfig_.subscribe_domain());
|
||||
}
|
||||
if (!protoConfig_.subscribe_event().empty()) {
|
||||
fullCmd_.emplace_back("-n");
|
||||
fullCmd_.emplace_back(protoConfig_.subscribe_event());
|
||||
}
|
||||
HILOG_INFO(LOG_CORE, "END %s: success!", __func__);
|
||||
return true;
|
||||
}
|
||||
|
@ -17,4 +17,6 @@ option optimize_for = LITE_RUNTIME;
|
||||
// TODO Save the fetch data
|
||||
message HisyseventConfig {
|
||||
string msg = 1;
|
||||
string subscribe_domain = 2;
|
||||
string subscribe_event = 3;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user