Skip to content

Commit

Permalink
Add node occurrences to detail section for easier debugging
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 624314662
  • Loading branch information
zzzaries authored and tkiela1 committed Apr 12, 2024
1 parent 9218164 commit 55ed9c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export namespace Node {
* Metrics are always "total" rather than "self".
*/
export interface Metrics {
time?: /* double */ number;
flops?: /* double */ number;
bandwidthUtils?: /* double */ number[];
rawTime?: /* double */ number;
rawFlops?: /* double */ number;
rawBytesAccessedArray?: /* double */ number[];
occurrences?: /* uint32 */ number;
avgTimePs?: /* double */ number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
<div class="title">Total Time Sum:</div>
<code class="expression">{{rawTimeMs}}</code>
</div>
<div class="info" [hidden]="!occurrences">
<div class="title">Occurrences:</div>
<code class="expression">{{occurrences}}</code>
</div>
<div class="info" [hidden]="!avgTimeMs">
<div class="title">Total Time Avg:</div>
<code class="expression">{{avgTimeMs}}</code>
Expand Down
2 changes: 2 additions & 0 deletions frontend/app/components/op_profile/op_details/op_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class OpDetails {
expression: string = '';
provenance: string = '';
rawTimeMs = '';
occurrences = 0;
avgTimeMs = '';
fused: boolean = false;
hasCategory: boolean = false;
Expand Down Expand Up @@ -229,6 +230,7 @@ export class OpDetails {
} else {
this.rawTimeMs = '';
}
this.occurrences = this.node.metrics?.occurrences || 0;

if (this.node.metrics && this.node.metrics.avgTimePs) {
this.avgTimeMs = utils.humanReadableText(
Expand Down

0 comments on commit 55ed9c7

Please sign in to comment.