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

Commit a063a5ff authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Add new association time totals to procstats proto."

parents 2505d758 2c0f822a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -950,6 +950,14 @@ public final class AssociationState {

        proto.write(PackageAssociationProcessStatsProto.COMPONENT_NAME, mName);

        proto.write(PackageAssociationProcessStatsProto.TOTAL_COUNT, mTotalCount);
        proto.write(PackageAssociationProcessStatsProto.TOTAL_DURATION_MS, getTotalDuration(now));
        if (mTotalActiveCount != 0) {
            proto.write(PackageAssociationProcessStatsProto.ACTIVE_COUNT, mTotalActiveCount);
            proto.write(PackageAssociationProcessStatsProto.ACTIVE_DURATION_MS,
                    getActiveDuration(now));
        }

        final int NSRC = mSources.size();
        for (int isrc = 0; isrc < NSRC; isrc++) {
            final SourceKey key = mSources.keyAt(isrc);
+14 −1
Original line number Diff line number Diff line
@@ -241,12 +241,25 @@ message PackageAssociationSourceProcessStatsProto {
    repeated StateStats active_state_stats = 6;
}

// Next Tag: 3
// Next Tag: 7
message PackageAssociationProcessStatsProto {
    option (android.msg_privacy).dest = DEST_AUTOMATIC;

    // Name of the target component.
    optional string component_name = 1;

    // Total count of the times this association appeared.
    optional int32 total_count = 3;

    // Millisecond uptime total duration this association was around.
    optional int64 total_duration_ms = 4;

    // Total count of the times this association became actively impacting its target process.
    optional int32 active_count = 5;

    // Millisecond uptime total duration this association was around.
    optional int64 active_duration_ms = 6;

    // Information on one source in this association.
    repeated PackageAssociationSourceProcessStatsProto sources = 2;
}