bundle stats - include commit
This commit is contained in:
parent
b71ea763dc
commit
f8e67cef5d
|
@ -332,7 +332,7 @@ function packageTask(platform, arch, opts) {
|
|||
if (opts.stats) {
|
||||
result.on('end', () => {
|
||||
const { submitAllStats } = require('./lib/stats');
|
||||
submitAllStats(product).then(() => console.log('Submitted bundle stats!'));
|
||||
submitAllStats(product, commit).then(() => console.log('Submitted bundle stats!'));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ function createStatsStream(group, log) {
|
|||
});
|
||||
}
|
||||
exports.createStatsStream = createStatsStream;
|
||||
function submitAllStats(productJson) {
|
||||
function submitAllStats(productJson, commit) {
|
||||
var sorted = [];
|
||||
// move entries for single files to the front
|
||||
_entries.forEach(function (value) {
|
||||
|
@ -110,11 +110,12 @@ function submitAllStats(productJson) {
|
|||
client.config.endpointUrl = 'https://vortex.data.microsoft.com/collect/v1';
|
||||
/* __GDPR__
|
||||
"monacoworkbench/packagemetrics" : {
|
||||
"commit" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||
"size" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
|
||||
"count" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
|
||||
}
|
||||
*/
|
||||
client.trackEvent("monacoworkbench/packagemetrics", { size: JSON.stringify(sizes), count: JSON.stringify(counts) });
|
||||
client.trackEvent("monacoworkbench/packagemetrics", { commit: commit, size: JSON.stringify(sizes), count: JSON.stringify(counts) });
|
||||
client.sendPendingData(function () { return resolve(); });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ export function createStatsStream(group: string, log?: boolean): es.ThroughStrea
|
|||
});
|
||||
}
|
||||
|
||||
export function submitAllStats(productJson: any): Promise<void> {
|
||||
export function submitAllStats(productJson: any, commit: string): Promise<void> {
|
||||
|
||||
let sorted: Entry[] = [];
|
||||
// move entries for single files to the front
|
||||
|
@ -117,11 +117,12 @@ export function submitAllStats(productJson: any): Promise<void> {
|
|||
|
||||
/* __GDPR__
|
||||
"monacoworkbench/packagemetrics" : {
|
||||
"commit" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
|
||||
"size" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
|
||||
"count" : {"classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
|
||||
}
|
||||
*/
|
||||
client.trackEvent(`monacoworkbench/packagemetrics`, { size: JSON.stringify(sizes), count: JSON.stringify(counts) });
|
||||
client.trackEvent(`monacoworkbench/packagemetrics`, { commit, size: JSON.stringify(sizes), count: JSON.stringify(counts) });
|
||||
client.sendPendingData(() => resolve());
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue