Skip to content

Commit

Permalink
Merge "Show modem counters and slices from the google3 module in the …
Browse files Browse the repository at this point in the history
…UI." into main
  • Loading branch information
Simon MacMullen authored and Gerrit Code Review committed Aug 23, 2024
2 parents 7b927e1 + 4065de4 commit cc4cf62
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ui/src/plugins/dev.perfetto.AndroidLongBatteryTracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
SimpleCounterTrack,
SimpleCounterTrackConfig,
} from '../../frontend/simple_counter_track';
import {globals} from '../../frontend/globals';

interface ContainedTrace {
uuid: string;
Expand Down Expand Up @@ -1466,6 +1467,39 @@ class AndroidLongBatteryTracing implements PerfettoPlugin {
);

const e = ctx.engine;

if (globals.isInternalUser) {
await e.query(
`INCLUDE PERFETTO MODULE
google3.wireless.android.telemetry.trace_extractor.modules.modem_tea_metrics`,
);
const counters = await e.query(
`select distinct name from pixel_modem_counters`,
);
const countersIt = counters.iter({name: 'str'});
for (; countersIt.valid(); countersIt.next()) {
this.addCounterTrack(
ctx,
countersIt.name,
`select ts, value from pixel_modem_counters where name = "${countersIt.name}"`,
groupName,
);
}
const slices = await e.query(
`select distinct track_name from pixel_modem_slices`,
);
const slicesIt = slices.iter({track_name: 'str'});
for (; slicesIt.valid(); slicesIt.next()) {
this.addSliceTrack(
ctx,
it.name,
`select ts dur, slice_name as name from pixel_modem_counters
where track_name = "${slicesIt.track_name}"`,
groupName,
);
}
}

await e.query(MODEM_RIL_STRENGTH);
await e.query(MODEM_RIL_CHANNELS_PREAMBLE);

Expand Down

0 comments on commit cc4cf62

Please sign in to comment.