Telemetry for update bundle event

Summary: Updating an existing bundle is now logged as a telemetric event.

Reviewed By: davidaurelio

Differential Revision: D3804754

fbshipit-source-id: adab3b054a161bd9535ad01d52573fb7bb177d43
This commit is contained in:
Ovidiu Viorel Iepure 2016-09-01 11:11:38 -07:00 committed by Facebook Github Bot 5
parent a02c238464
commit 46e47aaecd
1 changed files with 11 additions and 0 deletions

View File

@ -510,6 +510,16 @@ class Server {
const deps = bundleDeps.get(bundle);
const {dependencyPairs, files, idToIndex, outdated} = deps;
if (outdated.size) {
const updateExistingBundleEventId =
Activity.startEvent(
'Updating existing bundle',
{
outdatedModules: outdated.size,
},
{
telemetric: true,
},
);
debug('Attempt to update existing bundle');
const changedModules =
Array.from(outdated, this.getModuleForPath, this);
@ -565,6 +575,7 @@ class Server {
bundle.invalidateSource();
debug('Successfully updated existing bundle');
Activity.endEvent(updateExistingBundleEventId);
return bundle;
});
}).catch(e => {