Skip to content

Commit 9d08cf8

Browse files
authored
Merge pull request #14 from github-copilot-community/feature/languages-breakdown-enhancements
Feature/languages breakdown enhancements
2 parents 9540792 + 81ff6b4 commit 9d08cf8

File tree

5 files changed

+55
-80
lines changed

5 files changed

+55
-80
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VUE_APP_MOCKED_DATA=true
22

3-
VUE_APP_GITHUB_ORG=
3+
VUE_APP_GITHUB_ORG=octodemo
44

55
VUE_APP_GITHUB_TOKEN=

src/assets/copilot_metrics_response_sample.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"total_lines_suggested": 35290,
77
"total_lines_accepted": 5038,
88
"total_active_users": 97,
9-
"total_chat_acceptances": 174,
10-
"total_chat_turns": 119,
9+
"total_chat_acceptances": 157,
10+
"total_chat_turns": 190,
1111
"total_active_chat_users": 38,
1212
"breakdown": [
1313
{
@@ -957,7 +957,7 @@
957957
"active_users": 2
958958
}
959959
],
960-
"total_chat_acceptances": 149,
960+
"total_chat_acceptances": 151,
961961
"total_chat_turns": 168,
962962
"total_active_chat_users": 7
963963
},
@@ -1510,7 +1510,7 @@
15101510
"active_users": 2
15111511
}
15121512
],
1513-
"total_chat_acceptances": 182,
1513+
"total_chat_acceptances": 12,
15141514
"total_chat_turns": 43,
15151515
"total_active_chat_users": 6
15161516
},
@@ -2054,7 +2054,7 @@
20542054
"active_users": 2
20552055
}
20562056
],
2057-
"total_chat_acceptances": 57,
2057+
"total_chat_acceptances": 27,
20582058
"total_chat_turns": 43,
20592059
"total_active_chat_users": 187
20602060
},
@@ -2391,7 +2391,7 @@
23912391
"active_users": 2
23922392
}
23932393
],
2394-
"total_chat_acceptances": 180,
2394+
"total_chat_acceptances": 93,
23952395
"total_chat_turns": 196,
23962396
"total_active_chat_users": 146
23972397
},
@@ -2755,7 +2755,7 @@
27552755
"active_users": 2
27562756
}
27572757
],
2758-
"total_chat_acceptances": 161,
2758+
"total_chat_acceptances": 21,
27592759
"total_chat_turns": 88,
27602760
"total_active_chat_users": 141
27612761
},
@@ -3227,7 +3227,7 @@
32273227
"active_users": 2
32283228
}
32293229
],
3230-
"total_chat_acceptances": 71,
3230+
"total_chat_acceptances": 142,
32313231
"total_chat_turns": 159,
32323232
"total_active_chat_users": 53
32333233
},
@@ -3780,7 +3780,7 @@
37803780
"active_users": 1
37813781
}
37823782
],
3783-
"total_chat_acceptances": 118,
3783+
"total_chat_acceptances": 53,
37843784
"total_chat_turns": 192,
37853785
"total_active_chat_users": 34
37863786
},
@@ -4387,7 +4387,7 @@
43874387
"active_users": 1
43884388
}
43894389
],
4390-
"total_chat_acceptances": 132,
4390+
"total_chat_acceptances": 16,
43914391
"total_chat_turns": 36,
43924392
"total_active_chat_users": 162
43934393
},
@@ -4985,7 +4985,7 @@
49854985
"active_users": 3
49864986
}
49874987
],
4988-
"total_chat_acceptances": 108,
4988+
"total_chat_acceptances": 68,
49894989
"total_chat_turns": 118,
49904990
"total_active_chat_users": 5
49914991
},
@@ -5286,7 +5286,7 @@
52865286
"active_users": 2
52875287
}
52885288
],
5289-
"total_chat_acceptances": 39,
5289+
"total_chat_acceptances": 46,
52905290
"total_chat_turns": 96,
52915291
"total_active_chat_users": 9
52925292
},
@@ -5623,7 +5623,7 @@
56235623
"active_users": 2
56245624
}
56255625
],
5626-
"total_chat_acceptances": 125,
5626+
"total_chat_acceptances": 14,
56275627
"total_chat_turns": 19,
56285628
"total_active_chat_users": 54
56295629
},
@@ -6059,7 +6059,7 @@
60596059
"active_users": 2
60606060
}
60616061
],
6062-
"total_chat_acceptances": 42,
6062+
"total_chat_acceptances": 142,
60636063
"total_chat_turns": 194,
60646064
"total_active_chat_users": 44
60656065
},
@@ -6567,7 +6567,7 @@
65676567
"active_users": 2
65686568
}
65696569
],
6570-
"total_chat_acceptances": 11,
6570+
"total_chat_acceptances": 23,
65716571
"total_chat_turns": 37,
65726572
"total_active_chat_users": 90
65736573
},
@@ -7030,7 +7030,7 @@
70307030
"active_users": 1
70317031
}
70327032
],
7033-
"total_chat_acceptances": 11,
7033+
"total_chat_acceptances": 27,
70347034
"total_chat_turns": 160,
70357035
"total_active_chat_users": 131
70367036
},
@@ -7574,7 +7574,7 @@
75747574
"active_users": 1
75757575
}
75767576
],
7577-
"total_chat_acceptances": 15,
7577+
"total_chat_acceptances": 1,
75787578
"total_chat_turns": 16,
75797579
"total_active_chat_users": 45
75807580
},
@@ -7893,7 +7893,7 @@
78937893
"active_users": 2
78947894
}
78957895
],
7896-
"total_chat_acceptances": 102,
7896+
"total_chat_acceptances": 4,
78977897
"total_chat_turns": 22,
78987898
"total_active_chat_users": 115
78997899
},
@@ -8257,7 +8257,7 @@
82578257
"active_users": 2
82588258
}
82598259
],
8260-
"total_chat_acceptances": 194,
8260+
"total_chat_acceptances": 123,
82618261
"total_chat_turns": 140,
82628262
"total_active_chat_users": 58
82638263
},
@@ -8837,7 +8837,7 @@
88378837
"active_users": 1
88388838
}
88398839
],
8840-
"total_chat_acceptances": 125,
8840+
"total_chat_acceptances": 52,
88418841
"total_chat_turns": 178,
88428842
"total_active_chat_users": 199
88438843
},
@@ -9453,7 +9453,7 @@
94539453
"active_users": 2
94549454
}
94559455
],
9456-
"total_chat_acceptances": 134,
9456+
"total_chat_acceptances": 104,
94579457
"total_chat_turns": 146,
94589458
"total_active_chat_users": 136
94599459
},
@@ -9961,7 +9961,7 @@
99619961
"active_users": 2
99629962
}
99639963
],
9964-
"total_chat_acceptances": 55,
9964+
"total_chat_acceptances": 24,
99659965
"total_chat_turns": 108,
99669966
"total_active_chat_users": 10
99679967
},
@@ -10433,7 +10433,7 @@
1043310433
"active_users": 2
1043410434
}
1043510435
],
10436-
"total_chat_acceptances": 7,
10436+
"total_chat_acceptances": 39,
1043710437
"total_chat_turns": 43,
1043810438
"total_active_chat_users": 99
1043910439
},
@@ -10851,7 +10851,7 @@
1085110851
"active_users": 2
1085210852
}
1085310853
],
10854-
"total_chat_acceptances": 104,
10854+
"total_chat_acceptances": 130,
1085510855
"total_chat_turns": 132,
1085610856
"total_active_chat_users": 173
1085710857
},
@@ -11053,7 +11053,7 @@
1105311053
"active_users": 2
1105411054
}
1105511055
],
11056-
"total_chat_acceptances": 92,
11056+
"total_chat_acceptances": 102,
1105711057
"total_chat_turns": 143,
1105811058
"total_active_chat_users": 142
1105911059
}

src/components/AppHeader.vue

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/components/CopilotChatViewer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<v-card-item>
2121
<div>
2222
<div class="text-overline mb-1" style="visibility: hidden;">filler</div>
23-
<div class="text-h6 mb-1">Cumulative Number of Lines of Code Accepted</div>
23+
<div class="text-h6 mb-1">Cumulative Number of Acceptances</div>
2424
<div class="text-caption">
2525
Over the last 28 days
2626
</div>
@@ -33,7 +33,7 @@
3333

3434
<v-container style="min-height: 300px;" class="px-4 elevation-2">
3535

36-
<h2>Total Suggestions Count | Total Acceptances Count</h2>
36+
<h2>Total Acceptances | Total Turns Count</h2>
3737
<Line :data="totalNumberAcceptancesAndTurnsChartData" :options="chartOptions" />
3838

3939
<h2>Total Active Copilot Chat Users</h2>

src/components/LanguagesBreakdown.vue

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,31 @@
2323
<v-main class="p-1" style="min-height: 300px;">
2424

2525
<v-container style="min-height: 300px;" class="px-4 elevation-2">
26-
<v-card>
27-
<v-card-item class="d-flex justify-center align-center">
28-
<div class="text-overline mb-1" style="visibility: hidden;">filler</div>
29-
<div class="text-h6 mb-1">Top 5 languages by accepted prompts</div>
30-
<div style="width: 300px; height: 300px;" >
31-
<Pie :data="languagesChartDataTop5AcceptedPrompts" :options="chartOptions" />
32-
</div>
33-
</v-card-item>
34-
</v-card>
26+
<v-row>
27+
<v-col cols="6">
28+
<v-card>
29+
<v-card-item class="d-flex justify-center align-center">
30+
<div class="text-overline mb-1" style="visibility: hidden;">filler</div>
31+
<div class="text-h6 mb-1">Top 5 languages by accepted prompts</div>
32+
<div style="width: 300px; height: 300px;">
33+
<Pie :data="languagesChartDataTop5AcceptedPrompts" :options="chartOptions" />
34+
</div>
35+
</v-card-item>
36+
</v-card>
37+
</v-col>
3538

36-
<v-card>
37-
<v-card-item class="d-flex justify-center align-center">
38-
<div class="text-overline mb-1" style="visibility: hidden;">filler</div>
39-
<div class="text-h6 mb-1">Top 5 languages by acceptance rate</div>
40-
<div style="width: 300px; height: 300px;" >
41-
<Pie :data="languagesChartDataTop5AcceptanceRate" :options="chartOptions" />
42-
</div>
43-
</v-card-item>
44-
</v-card>
39+
<v-col cols="6">
40+
<v-card>
41+
<v-card-item class="d-flex justify-center align-center">
42+
<div class="text-overline mb-1" style="visibility: hidden;">filler</div>
43+
<div class="text-h6 mb-1">Top 5 languages by acceptance rate</div>
44+
<div style="width: 300px; height: 300px;">
45+
<Pie :data="languagesChartDataTop5AcceptanceRate" :options="chartOptions" />
46+
</div>
47+
</v-card-item>
48+
</v-card>
49+
</v-col>
50+
</v-row>
4551

4652
<br>
4753
<h2>Languages Breakdown </h2>
@@ -112,7 +118,6 @@
112118
};
113119
},
114120
setup() {
115-
console.log('LanguagesBreakdown setup');
116121
117122
const metrics = ref<Metrics[]>([]);
118123
@@ -172,7 +177,6 @@
172177
yield* [...this.entries()].sort((a, b) => b[1].acceptanceRate - a[1].acceptanceRate);
173178
}
174179
175-
176180
// Get the top 5 languages by acceptance rate
177181
const top5LanguagesAcceptanceRate = new Map([...languages.value].slice(0, 5));
178182
@@ -184,7 +188,7 @@
184188
datasets: [
185189
{
186190
data: Array.from(top5LanguagesAcceptanceRate.values()).map(language => language.acceptanceRate.toFixed(2)),
187-
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
191+
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16', '#FFD700', '#FF69B4', '#D8BFD8', '#DDA0DD', '#EE82EE', '#DA70D6', '#BA55D3', '#9370DB', '#8A2BE2', '#9400D3'],
188192
},
189193
],
190194
};
@@ -199,7 +203,7 @@
199203
datasets: [
200204
{
201205
data: Array.from(languages.value.values()).map(language => language.acceptedPrompts),
202-
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
206+
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16', '#FFD700', '#FF69B4', '#D8BFD8', '#DDA0DD', '#EE82EE', '#DA70D6', '#BA55D3', '#9370DB', '#8A2BE2', '#9400D3'],
203207
},
204208
],
205209
};
@@ -212,19 +216,12 @@
212216
datasets: [
213217
{
214218
data: Array.from(top5LanguagesAcceptedPrompts.values()).map(language => language.acceptedPrompts),
215-
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16'],
219+
backgroundColor: ['#41B883', '#E46651', '#00D8FF', '#DD1B16', '#FFD700', '#FF69B4', '#D8BFD8', '#DDA0DD', '#EE82EE', '#DA70D6', '#BA55D3', '#9370DB', '#8A2BE2', '#9400D3'],
216220
},
217221
],
218222
};
219223
220-
221-
222224
numberOfLanguages.value = languages.value.size;
223-
224-
console.log("Number of languages: " + numberOfLanguages.value);
225-
226-
console.log("LanguagesChartData: " + JSON.stringify(languagesChartData));
227-
228225
229226
}).catch(error => {
230227
console.log(error);

0 commit comments

Comments
 (0)