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

Commit a822bc13 authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Change AppOps collection to include historical appops since beginning of time.

Running totals are expected to work correctly with value metric.

Change-Id: If86ec8721a4abf5eed644b05d3fe8a419e050213
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 10060
parent a24da298
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -156,8 +156,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -2071,9 +2069,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {

            CompletableFuture<HistoricalOps> ops = new CompletableFuture<>();
            HistoricalOpsRequest histOpsRequest =
                    new HistoricalOpsRequest.Builder(
                            Instant.now().minus(1, ChronoUnit.HOURS).toEpochMilli(),
                            Long.MAX_VALUE).build();
                    new HistoricalOpsRequest.Builder(0, Long.MAX_VALUE).build();
            appOps.getHistoricalOps(histOpsRequest, mContext.getMainExecutor(), ops::complete);

            HistoricalOps histOps = ops.get(EXTERNAL_STATS_SYNC_TIMEOUT_MILLIS,