Skip to content

Commit

Permalink
internal changes
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 559810703
  • Loading branch information
zzzaries authored and copybara-github committed Aug 24, 2023
1 parent bd444e9 commit 51af042
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plugin/trace_viewer/tf_trace_viewer/tf-trace-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,23 @@
'" target="_blank"> see hlo graph for ' +
hloOp + '@' + hloModule + '</a>';
this._eventDetails.appendChild(graphViewLinkElement);

const hloOpStatsLink = new URL(`${window.location.origin}/hlo_stats/${this._sessionId}`);
hloOpStatsLink.searchParams.append("hlo_op_name", hloOp);
hloOpStatsLink.searchParams.append("program_id", hloModule);
const hloOpStatsLinkElement = document.createElement('div');
hloOpStatsLinkElement.innerHTML = '<a href="' + hloOpStatsLink.href +
'" target="_blank"> see hlo stats for ' +
hloOp + '@' + hloModule + '</a>';
hloOpStatsLinkElement.addEventListener('click', () => {
window.gtag && window.gtag('event', 'tv-hlo-click', {
'screen_name': 'trace viewer',
'event_category': 'click',
'event_label': 'hlo_stats_link',
'event_variable': hloOpStatsLink.href,
});
});
this._eventDetails.appendChild(hloOpStatsLinkElement);
}
// For `TfrtModelRun` event, add links to the associated MLIR graphs.
if (event.title.includes("TfrtModelRun")) {
Expand Down

0 comments on commit 51af042

Please sign in to comment.