Commit 2433c473 authored by nanahira's avatar nanahira

remove clock

parent 8862a77e
Pipeline #5292 passed with stages
in 5 minutes and 32 seconds
......@@ -207,8 +207,8 @@ export class UpdateService extends ConsoleLogger {
.leftJoin('build.archives', 'archive', 'archive.role = :partRole', { partRole: ArchiveType.Part })
);
// console.log(build.archives);
let clock = moment();
this.log('part 1');
//let clock = moment();
//this.log('part 1');
const tryExactArchiveQuery = this.db
.getRepository(Archive)
.createQueryBuilder('archive')
......@@ -254,9 +254,9 @@ export class UpdateService extends ConsoleLogger {
.andWhere('archive.buildId = :buildId', { buildId: build.id })
.getRawMany()
).map((obj) => obj.archiveId);*/
this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
clock = moment();
this.log('part 2');
//this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
//clock = moment();
//this.log('part 2');
const allPossiblePartArchives = await this.db
.getRepository(Archive)
.createQueryBuilder('archive')
......@@ -280,13 +280,13 @@ export class UpdateService extends ConsoleLogger {
*/
//const allPartArchives = await allPartArchivesQuery.getMany();
this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
clock = moment();
this.log('part 3');
//this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
//clock = moment();
//this.log('part 3');
const allPartArchives = this.pickArchives(allPossiblePartArchives, requestedFiles);
this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
clock = moment();
this.log('part 4');
//this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
//clock = moment();
//this.log('part 4');
const fullArchive = await this.db
.getRepository(Archive)
.createQueryBuilder('archive')
......@@ -300,7 +300,7 @@ export class UpdateService extends ConsoleLogger {
if (!allPartArchives.length || (fullArchive && this.getCostOfArchives([fullArchive]) <= this.getCostOfArchives(allPartArchives))) {
archives = [fullArchive];
}
this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
//this.log(`Time used: ${moment().diff(clock, 'seconds')} s`);
return {
cdnUrl: this.cdnUrl,
archives,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment