Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 3c50ec3

Browse files
committed
Add NumberOfNavigateToPullRequestFileDiff metrics
This counter is incremented when GoToSolutionOrPullRequestFileCommand is used to navigate from a solution file to a PR file diff.
1 parent be891e1 commit 3c50ec3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/GitHub.Exports/Models/UsageModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public class MeasuresModel
7070
public int NumberOfShowCurrentPullRequest { get; set; }
7171
public int NumberOfStatusBarOpenPullRequestList { get; set; }
7272
public int NumberOfTeamExplorerHomeOpenPullRequestList { get; set; }
73+
public int NumberOfNavigateToPullRequestFileDiff { get; set; }
7374
}
7475
}
7576
}

src/GitHub.VisualStudio/Commands/GoToSolutionOrPullRequestFileCommand.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ public override async Task Execute()
104104
return;
105105
}
106106

107-
// Navigate from working file to PR diff
108-
// TODO: add metrics
109-
// await usageTracker.Value.IncrementCounter(x => x.NumberOf???);
110-
107+
// Navigate from solution file to PR diff file
108+
await usageTracker.Value.IncrementCounter(x => x.NumberOfNavigateToPullRequestFileDiff);
111109

112110
var diffViewer = await pullRequestEditorService.Value.OpenDiff(session, relativePath, "HEAD", scrollToFirstDiff: false);
113111
if (diffViewer == null)

0 commit comments

Comments
 (0)