diff options
author | Yi Kong <yikong@google.com> | 2020-08-18 02:21:04 +0800 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2020-08-18 02:21:30 +0800 |
commit | 0d45d1b1456fe6e39bd8db99e4f760281f13ab9c (patch) | |
tree | 1e7339b2f0eb27c7aae8c9d0eba436cd536ba178 /profcollectd/libprofcollectd | |
parent | 748fd1690f633987c4337359053804bae3b1f250 (diff) | |
download | extras-0d45d1b1456fe6e39bd8db99e4f760281f13ab9c.tar.gz |
profcollectd: Rename config env to persist.*
... otherwise the option gets reset after reboot.
Test: TreeHugger
Bug: 79161490
Change-Id: Id0ce62735fb51faafe933206be6f4b9827f8718f
Diffstat (limited to 'profcollectd/libprofcollectd')
-rw-r--r-- | profcollectd/libprofcollectd/scheduler.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/profcollectd/libprofcollectd/scheduler.cpp b/profcollectd/libprofcollectd/scheduler.cpp index 30a181aa..96b0c82d 100644 --- a/profcollectd/libprofcollectd/scheduler.cpp +++ b/profcollectd/libprofcollectd/scheduler.cpp @@ -113,16 +113,19 @@ OptError ProfcollectdScheduler::ReadConfig() { config.buildFingerprint = GetProperty("ro.build.fingerprint", "unknown"); config.collectionInterval = std::chrono::seconds( - GetIntProperty("profcollectd.collection_interval", + GetIntProperty("persist.profcollectd.collection_interval", std::get<const int>(CONFIG_COLLECTION_INTERVAL_SEC.second))); config.samplingPeriod = std::chrono::milliseconds(GetIntProperty( - "profcollectd.sampling_period_ms", std::get<const int>(CONFIG_SAMPLING_PERIOD_MS.second))); - config.traceOutputDir = GetProperty("profcollectd.trace_output_dir", + "persist.profcollectd.sampling_period_ms", + std::get<const int>(CONFIG_SAMPLING_PERIOD_MS.second))); + config.traceOutputDir = GetProperty("persist.profcollectd.trace_output_dir", std::get<const char*>(CONFIG_TRACE_OUTDIR.second)); config.profileOutputDir = - GetProperty("profcollectd.output_dir", std::get<const char*>(CONFIG_PROFILE_OUTDIR.second)); + GetProperty("persist.profcollectd.output_dir", + std::get<const char*>(CONFIG_PROFILE_OUTDIR.second)); config.binaryFilter = - GetProperty("profcollectd.binary_filter", std::get<const char*>(CONFIG_BINARY_FILTER.second)); + GetProperty("persist.profcollectd.binary_filter", + std::get<const char*>(CONFIG_BINARY_FILTER.second)); ClearOnConfigChange(config); return std::nullopt; |