diff options
author | Robin Hsu <robinhsu@google.com> | 2022-07-06 12:22:35 +0800 |
---|---|---|
committer | Robin Hsu <robinhsu@google.com> | 2022-08-23 08:14:32 +0000 |
commit | fdb36c83b5bf220c8fdd234fe52f285587458d9d (patch) | |
tree | dee07dde93f3227f5822ffb79f5f079107753c54 /pixelstats/MmMetricsReporter.cpp | |
parent | 625ec77b690889a85f1a270f966f42ee6743a422 (diff) |
pixelstat: MM metrics: keep 1st report
For atom 'PixelMmMetricsPerHour', previously we skip the first round
metrics reports. The intention was to skip those heavy boot-time metrics
so that it won't affect our statistics on normal data.
However, in newer implementation, we already have the
elapsed_timetsamp_nanos field (event time in "devices time since boot"
format) in the Suez table (b/223529199). Now it's even better:
We can use the device time to filter out those boot events, and we
can separate the statistics into two categories: (1) normal, and
(2) boot time.
So this time we don't skip the first round report.
Test: n/a
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: I05705e4b16b6e790b54b17a149179b6ea24f2fdf
Diffstat (limited to 'pixelstats/MmMetricsReporter.cpp')
-rw-r--r-- | pixelstats/MmMetricsReporter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pixelstats/MmMetricsReporter.cpp b/pixelstats/MmMetricsReporter.cpp index 558fd2d..4a2a087 100644 --- a/pixelstats/MmMetricsReporter.cpp +++ b/pixelstats/MmMetricsReporter.cpp @@ -313,7 +313,6 @@ void MmMetricsReporter::logPixelMmMetricsPerHour(const std::shared_ptr<IStats> & uint64_t gpu_memory = getGpuMemory(); std::vector<VendorAtomValue> values; - bool is_first_atom = (prev_hour_vmstat_.size() == 0) ? true : false; fillAtomValues(kMmMetricsPerHourInfo, vmstat, &prev_hour_vmstat_, &values); // resize values to add the following fields @@ -328,12 +327,9 @@ void MmMetricsReporter::logPixelMmMetricsPerHour(const std::shared_ptr<IStats> & tmp.set<VendorAtomValue::longValue>(gpu_memory); values[PixelMmMetricsPerHour::kGpuMemoryFieldNumber - kVendorAtomOffset] = tmp; - // Don't report the first atom to avoid big spike in accumulated values. - if (!is_first_atom) { - // Send vendor atom to IStats HAL - reportVendorAtom(stats_client, PixelAtoms::Atom::kPixelMmMetricsPerHour, values, - "PixelMmMetricsPerHour"); - } + // Send vendor atom to IStats HAL + reportVendorAtom(stats_client, PixelAtoms::Atom::kPixelMmMetricsPerHour, values, + "PixelMmMetricsPerHour"); } void MmMetricsReporter::logPixelMmMetricsPerDay(const std::shared_ptr<IStats> &stats_client) { |