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

Commit 44b048d

Browse files
committed
ExecuteGoToSolutionOrPullRequestFileCommand metric
Add metric for number of times ExecuteGoToSolutionOrPullRequestFileCommand is executed.
1 parent 2d70d9a commit 44b048d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/GitHub.Exports/Models/UsageModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public class MeasuresModel
7575
public int NumberOfOriginsUpdatedWhenForkingRepo { get; set; }
7676
public int NumberOfUpstreamsAddedWhenForkingRepo { get; set; }
7777
public int NumberOfTrackMasterUpstreamWhenForkingRepo { get; set; }
78+
public int ExecuteGoToSolutionOrPullRequestFileCommand { get; set; }
7879
public int NumberOfNavigateToPullRequestFileDiff { get; set; }
7980
public int NumberOfNavigateToCodeView { get; set; }
8081
public int ExecuteToggleInlineCommentMarginCommand { get; set; }

src/GitHub.VisualStudio/Commands/GoToSolutionOrPullRequestFileCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.ComponentModel.Composition;
33
using GitHub.Services;
4+
using GitHub.Extensions;
45
using GitHub.VisualStudio;
56
using GitHub.Services.Vssdk.Commands;
67
using Microsoft.VisualStudio;
@@ -54,6 +55,8 @@ public GoToSolutionOrPullRequestFileCommand(
5455

5556
public override async Task Execute()
5657
{
58+
usageTracker.Value.IncrementCounter(x => x.ExecuteGoToSolutionOrPullRequestFileCommand).Forget();
59+
5760
try
5861
{
5962
var sourceView = pullRequestEditorService.Value.FindActiveView();

0 commit comments

Comments
 (0)