Merge "[SP11] add dumpsys support to dump stats inside providers"

This commit is contained in:
Treehugger Robot
2020-02-12 02:45:38 +00:00
committed by Gerrit Code Review

View File

@@ -1610,6 +1610,22 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
pw.decreaseIndent(); pw.decreaseIndent();
pw.println(); pw.println();
pw.println("Stats Providers:");
pw.increaseIndent();
invokeForAllStatsProviderCallbacks((cb) -> {
pw.println(cb.mTag + " Xt:");
pw.increaseIndent();
pw.print(cb.getCachedStats(STATS_PER_IFACE).toString());
pw.decreaseIndent();
if (includeUid) {
pw.println(cb.mTag + " Uid:");
pw.increaseIndent();
pw.print(cb.getCachedStats(STATS_PER_UID).toString());
pw.decreaseIndent();
}
});
pw.decreaseIndent();
pw.println("Dev stats:"); pw.println("Dev stats:");
pw.increaseIndent(); pw.increaseIndent();
mDevRecorder.dumpLocked(pw, fullHistory); mDevRecorder.dumpLocked(pw, fullHistory);