@@ -3126,44 +3126,44 @@ func TestCopilotService_DownloadDailyMetrics(t *testing.T) {
31263126
31273127 want := & CopilotDailyMetrics {
31283128 Day : "2026-04-01" ,
3129- OrganizationID : String ("123" ),
3130- DailyActiveCLIUsers : Int (2 ),
3131- DailyActiveUsers : Int (10 ),
3132- WeeklyActiveUsers : Int (20 ),
3133- MonthlyActiveUsers : Int (30 ),
3129+ OrganizationID : Ptr ("123" ),
3130+ DailyActiveCLIUsers : Ptr (2 ),
3131+ DailyActiveUsers : Ptr (10 ),
3132+ WeeklyActiveUsers : Ptr (20 ),
3133+ MonthlyActiveUsers : Ptr (30 ),
31343134 CopilotMetricsChatPanel : CopilotMetricsChatPanel {
3135- ChatPanelAskMode : Int (4 ),
3135+ ChatPanelAskMode : Ptr (4 ),
31363136 },
31373137 TotalsByIDE : []* CopilotMetricsIDE {
3138- {IDE : "vscode" , UserInitiatedInteractionCount : Int (5 ), CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {LOCAddedSum : Int (100 )}},
3138+ {IDE : "vscode" , UserInitiatedInteractionCount : Ptr (5 ), CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {LOCAddedSum : Ptr (100 )}},
31393139 },
31403140 TotalsByFeature : []* CopilotMetricsFeature {
3141- {Feature : "completion" , UserInitiatedInteractionCount : Int (5 )},
3142- {Feature : "agent_edit" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {LOCAddedSum : Int (7 ), LOCDeletedSum : Int (2 )}},
3141+ {Feature : "completion" , UserInitiatedInteractionCount : Ptr (5 )},
3142+ {Feature : "agent_edit" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {LOCAddedSum : Ptr (7 ), LOCDeletedSum : Ptr (2 )}},
31433143 },
31443144 TotalsByLanguageFeature : []* CopilotMetricsLanguageFeature {
3145- {Language : "go" , Feature : "completion" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {CodeGenerationActivityCount : Int (3 )}},
3145+ {Language : "go" , Feature : "completion" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {CodeGenerationActivityCount : Ptr (3 )}},
31463146 },
31473147 TotalsByLanguageModel : []* CopilotMetricsLanguageModel {
3148- {Language : "go" , Model : "m1" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {CodeGenerationActivityCount : Int (3 )}},
3148+ {Language : "go" , Model : "m1" , CopilotMetricsCodeActivity : CopilotMetricsCodeActivity {CodeGenerationActivityCount : Ptr (3 )}},
31493149 },
31503150 TotalsByModelFeature : []* CopilotMetricsModelFeature {
3151- {Model : "m1" , Feature : "completion" , UserInitiatedInteractionCount : Int (5 )},
3151+ {Model : "m1" , Feature : "completion" , UserInitiatedInteractionCount : Ptr (5 )},
31523152 },
31533153 TotalsByCLI : & CopilotMetricsCLI {
3154- SessionCount : Int (3 ),
3155- RequestCount : Int (4 ),
3156- PromptCount : Int (2 ),
3154+ SessionCount : Ptr (3 ),
3155+ RequestCount : Ptr (4 ),
3156+ PromptCount : Ptr (2 ),
31573157 TokenUsage : & CopilotMetricsCLITokenUsage {
31583158 AvgTokensPerRequest : Ptr (4123.5 ),
3159- OutputTokensSum : Int (7000 ),
3160- PromptTokensSum : Int (9494 ),
3159+ OutputTokensSum : Ptr (7000 ),
3160+ PromptTokensSum : Ptr (9494 ),
31613161 },
31623162 },
3163- LOCAddedSum : Int (100 ),
3163+ LOCAddedSum : Ptr (100 ),
31643164 PullRequests : & CopilotMetricsPullRequests {
3165- TotalReviewed : Int (1 ),
3166- TotalCreated : Int (2 ),
3165+ TotalReviewed : Ptr (1 ),
3166+ TotalCreated : Ptr (2 ),
31673167 MedianMinutesToMerge : Ptr (12.5 ),
31683168 MedianMinutesToMergeCopilotAuthored : Ptr (4.5 ),
31693169 MedianMinutesToMergeCopilotReviewed : Ptr (6.5 ),
@@ -3247,21 +3247,21 @@ func TestCopilotService_DownloadPeriodicMetrics(t *testing.T) {
32473247 want := & CopilotPeriodicMetrics {
32483248 ReportStartDay : "2026-03-05" ,
32493249 ReportEndDay : "2026-04-01" ,
3250- OrganizationID : String ("123" ),
3250+ OrganizationID : Ptr ("123" ),
32513251 CreatedAt : & Timestamp {time .Date (2026 , 4 , 2 , 0 , 0 , 0 , 0 , time .UTC )},
32523252 DayTotals : []* CopilotDailyMetrics {
32533253 {
32543254 Day : "2026-03-05" ,
3255- DailyActiveCLIUsers : Int (2 ),
3256- DailyActiveUsers : Int (5 ),
3255+ DailyActiveCLIUsers : Ptr (2 ),
3256+ DailyActiveUsers : Ptr (5 ),
32573257 TotalsByCLI : & CopilotMetricsCLI {
3258- SessionCount : Int (1 ),
3259- RequestCount : Int (2 ),
3260- PromptCount : Int (1 ),
3258+ SessionCount : Ptr (1 ),
3259+ RequestCount : Ptr (2 ),
3260+ PromptCount : Ptr (1 ),
32613261 TokenUsage : & CopilotMetricsCLITokenUsage {
32623262 AvgTokensPerRequest : Ptr (4000.0 ),
3263- OutputTokensSum : Int (5000 ),
3264- PromptTokensSum : Int (3000 ),
3263+ OutputTokensSum : Ptr (5000 ),
3264+ PromptTokensSum : Ptr (3000 ),
32653265 },
32663266 },
32673267 PullRequests : & CopilotMetricsPullRequests {
@@ -3270,7 +3270,7 @@ func TestCopilotService_DownloadPeriodicMetrics(t *testing.T) {
32703270 MedianMinutesToMergeCopilotReviewed : Ptr (7.0 ),
32713271 },
32723272 },
3273- {Day : "2026-03-06" , DailyActiveUsers : Int (7 )},
3273+ {Day : "2026-03-06" , DailyActiveUsers : Ptr (7 )},
32743274 },
32753275 }
32763276
@@ -3327,17 +3327,17 @@ func TestCopilotService_DownloadUserDailyMetrics(t *testing.T) {
33273327 UserID : 1 ,
33283328 UserLogin : "alice" ,
33293329 Day : "2026-04-01" ,
3330- UserInitiatedInteractionCount : Int (5 ),
3330+ UserInitiatedInteractionCount : Ptr (5 ),
33313331 CopilotMetricsChatPanel : CopilotMetricsChatPanel {
3332- ChatPanelEditMode : Int (2 ),
3332+ ChatPanelEditMode : Ptr (2 ),
33333333 },
3334- UsedChat : Bool (true ),
3335- UsedCLI : Bool (true ),
3336- UsedCopilotCodeReviewActive : Bool (true ),
3334+ UsedChat : Ptr (true ),
3335+ UsedCLI : Ptr (true ),
3336+ UsedCopilotCodeReviewActive : Ptr (true ),
33373337 TotalsByCLI : & CopilotMetricsCLI {
3338- SessionCount : Int (2 ),
3339- RequestCount : Int (2 ),
3340- PromptCount : Int (1 ),
3338+ SessionCount : Ptr (2 ),
3339+ RequestCount : Ptr (2 ),
3340+ PromptCount : Ptr (1 ),
33413341 LastKnownCLIVersion : & CopilotMetricsCLIVersion {
33423342 SampledAt : & Timestamp {time .Date (2026 , 4 , 1 , 12 , 30 , 0 , 0 , time .UTC )},
33433343 CLIVersion : "1.0.8" ,
@@ -3346,7 +3346,7 @@ func TestCopilotService_DownloadUserDailyMetrics(t *testing.T) {
33463346 TotalsByIDE : []* CopilotUserMetricsIDE {
33473347 {
33483348 IDE : "vscode" ,
3349- UserInitiatedInteractionCount : Int (5 ),
3349+ UserInitiatedInteractionCount : Ptr (5 ),
33503350 LastKnownPluginVersion : & CopilotUserMetricsPluginVersion {
33513351 SampledAt : & Timestamp {time .Date (2026 , 4 , 1 , 12 , 0 , 0 , 0 , time .UTC )},
33523352 Plugin : "copilot" ,
@@ -3363,8 +3363,8 @@ func TestCopilotService_DownloadUserDailyMetrics(t *testing.T) {
33633363 UserID : 2 ,
33643364 UserLogin : "bob" ,
33653365 Day : "2026-04-01" ,
3366- UsedAgent : Bool (true ),
3367- UsedCopilotCodeReviewPassive : Bool (true ),
3366+ UsedAgent : Ptr (true ),
3367+ UsedCopilotCodeReviewPassive : Ptr (true ),
33683368 },
33693369 }
33703370
@@ -3436,26 +3436,26 @@ func TestCopilotService_DownloadUserPeriodicMetrics(t *testing.T) {
34363436 Day : "2026-03-05" ,
34373437 UserID : 1 ,
34383438 UserLogin : "alice" ,
3439- UserInitiatedInteractionCount : Int (3 ),
3440- UsedCopilotCodeReviewActive : Bool (true ),
3439+ UserInitiatedInteractionCount : Ptr (3 ),
3440+ UsedCopilotCodeReviewActive : Ptr (true ),
34413441 },
34423442 {
34433443 ReportStartDay : "2026-03-05" ,
34443444 ReportEndDay : "2026-04-01" ,
34453445 Day : "2026-03-06" ,
34463446 UserID : 1 ,
34473447 UserLogin : "alice" ,
3448- UsedCLI : Bool (true ),
3449- UsedCopilotCodeReviewPassive : Bool (true ),
3450- UsedCopilotCodingAgent : Bool (true ),
3448+ UsedCLI : Ptr (true ),
3449+ UsedCopilotCodeReviewPassive : Ptr (true ),
3450+ UsedCopilotCodingAgent : Ptr (true ),
34513451 TotalsByCLI : & CopilotMetricsCLI {
3452- SessionCount : Int (1 ),
3453- RequestCount : Int (3 ),
3454- PromptCount : Int (2 ),
3452+ SessionCount : Ptr (1 ),
3453+ RequestCount : Ptr (3 ),
3454+ PromptCount : Ptr (2 ),
34553455 TokenUsage : & CopilotMetricsCLITokenUsage {
34563456 AvgTokensPerRequest : Ptr (1200.5 ),
3457- OutputTokensSum : Int (2400 ),
3458- PromptTokensSum : Int (1201 ),
3457+ OutputTokensSum : Ptr (2400 ),
3458+ PromptTokensSum : Ptr (1201 ),
34593459 },
34603460 },
34613461 },
0 commit comments