Skip to content

Commit

Permalink
Telemetry for update bundle event
Browse files Browse the repository at this point in the history
Summary: Updating an existing bundle is now logged as a telemetric event.

Reviewed By: davidaurelio

Differential Revision: D3804754

fbshipit-source-id: adab3b054a161bd9535ad01d52573fb7bb177d43
  • Loading branch information
Ovidiu Viorel Iepure authored and Facebook Github Bot 5 committed Sep 1, 2016
1 parent a02c238 commit 46e47aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packager/react-packager/src/Server/index.js
Expand Up @@ -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);
Expand Down Expand Up @@ -565,6 +575,7 @@ class Server {

bundle.invalidateSource();
debug('Successfully updated existing bundle');
Activity.endEvent(updateExistingBundleEventId);
return bundle;
});
}).catch(e => {
Expand Down

0 comments on commit 46e47aa

Please sign in to comment.