Skip to content

Commit

Permalink
feat: log Package releases lookup time
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 24, 2020
1 parent 55034aa commit f6c7de4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/workers/repository/process/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pAll from 'p-all';
import { hrtime } from 'process';
import { logger } from '../../../logger';
import { getPackageUpdates } from '../../../manager';
import {
Expand Down Expand Up @@ -133,9 +134,12 @@ export async function fetchUpdates(
stats.depCount += depCount;
}
logger.info({ stats }, `Extraction statistics`);
const startTime = hrtime();
const allManagerJobs = managers.map((manager) =>
fetchManagerUpdates(config, packageFiles, manager)
);
await Promise.all(allManagerJobs);
logger.debug('fetchUpdates complete');
const duration = hrtime(startTime);
const seconds = Math.round(duration[0] + duration[1] / 1e9);
logger.info({ seconds }, 'Package releases lookups complete');
}

0 comments on commit f6c7de4

Please sign in to comment.