Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 360a3f67 authored by David Munoz Constantine's avatar David Munoz Constantine
Browse files

storaged: use correct accumulate variable for publishing disk stats



In the publish function, the variable mAccumulate_pub is used to log
disk performance. However, the variable mAccumulate is used to log disk
stats. The variable mAccumulate is only populated during a stall event.
The publish function is used to log disk stats on a periodic timer,
therefore, it should not rely on stall events to log stats. Instead,
it should rely on the appropriately named mAccumulate_pub variable.

Test: storaged unit tests

Change-Id: I30e00f2c69618705d3f308630b7e023bfc5e384e
Signed-off-by: default avatarDavid Munoz Constantine <dmunozc@squareup.com>
parent 77f4cb4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ void disk_stats_monitor::publish(void)
{
    struct disk_perf perf = get_disk_perf(&mAccumulate_pub);
    log_debug_disk_perf(&perf, "regular");
    log_event_disk_stats(&mAccumulate, "regular");
    log_event_disk_stats(&mAccumulate_pub, "regular");
    // Reset global structures
    memset(&mAccumulate_pub, 0, sizeof(struct disk_stats));
}