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

Commit b8106947 authored by Narayan Kamath's avatar Narayan Kamath Committed by android-build-merger
Browse files

Merge "Log optimizing apps dialog time in seconds (and not decis)." into nyc-dev

am: 7fa50169

* commit '7fa50169':
  Log optimizing apps dialog time in seconds (and not decis).

Change-Id: Ia86b8cb0f38d5dd60d72cc223a658d2cd393477a
parents 9311165c 7fa50169
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -7237,16 +7237,13 @@ public class PackageManagerService extends IPackageManager.Stub {
            }
        }
        final int elapsedTimeMs = (int) TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime);
        // Report the elapsed time in deci-seconds (tenths of a second) rounded upwards
        // (e.g. 1234 ms will become 13ds). This will help provide histograms at a more reasonable
        // granularity.
        final int elapsedTimeDs = ((elapsedTimeMs + 99) / 100);
        final int elapsedTimeSeconds =
                (int) TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - startTime);
        MetricsLogger.histogram(mContext, "opt_dialog_num_dexopted", numberOfPackagesOptimized);
        MetricsLogger.histogram(mContext, "opt_dialog_num_skipped", numberOfPackagesSkipped);
        MetricsLogger.histogram(mContext, "opt_dialog_num_failed", numberOfPackagesFailed);
        MetricsLogger.histogram(mContext, "opt_dialog_num_total", getOptimizablePackages().size());
        MetricsLogger.histogram(mContext, "opt_dialog_time_decis", elapsedTimeDs);
        MetricsLogger.histogram(mContext, "opt_dialog_time_s", elapsedTimeSeconds);
    }
    @Override