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 коммит произвёл Facebook Github Bot 5
Родитель a02c238464
Коммит 46e47aaecd
1 изменённых файлов: 11 добавлений и 0 удалений

11
packager/react-packager/src/Server/index.js поставляемый
Просмотреть файл

@ -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 => {