Remove unnecessary rounding
This commit is contained in:
parent
78420f65ab
commit
34a8bdcf47
|
@ -55,9 +55,7 @@ export const execAsync = async (command: string | string[]) => {
|
||||||
: command;
|
: command;
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const result = await execAsync_(escapedCommand);
|
const result = await execAsync_(escapedCommand);
|
||||||
log.debug(
|
log.debug(() => `${escapedCommand} (${Date.now() - startTime} ms)`);
|
||||||
() => `${escapedCommand} (${Math.round(Date.now() - startTime)} ms)`,
|
|
||||||
);
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ export const indexFaces = async (enteFile: EnteFile, localFile?: File) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug(() => {
|
log.debug(() => {
|
||||||
const ms = Math.round(Date.now() - startTime);
|
|
||||||
const nf = mlFile.faces?.length ?? 0;
|
const nf = mlFile.faces?.length ?? 0;
|
||||||
|
const ms = Date.now() - startTime;
|
||||||
return `Indexed ${nf} faces in file ${enteFile.id} (${ms} ms)`;
|
return `Indexed ${nf} faces in file ${enteFile.id} (${ms} ms)`;
|
||||||
});
|
});
|
||||||
return mlFile;
|
return mlFile;
|
||||||
|
|
|
@ -51,9 +51,7 @@ class HEICConverter {
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
const convertedHEIC =
|
const convertedHEIC =
|
||||||
await worker.heicToJPEG(fileBlob);
|
await worker.heicToJPEG(fileBlob);
|
||||||
const ms = Math.round(
|
const ms = Date.now() - startTime;
|
||||||
Date.now() - startTime,
|
|
||||||
);
|
|
||||||
log.debug(() => `heic => jpeg (${ms} ms)`);
|
log.debug(() => `heic => jpeg (${ms} ms)`);
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
resolve(convertedHEIC);
|
resolve(convertedHEIC);
|
||||||
|
|
|
@ -82,7 +82,7 @@ const ffmpegExec = async (
|
||||||
|
|
||||||
const result = ffmpeg.FS("readFile", outputPath);
|
const result = ffmpeg.FS("readFile", outputPath);
|
||||||
|
|
||||||
const ms = Math.round(Date.now() - startTime);
|
const ms = Date.now() - startTime;
|
||||||
log.debug(() => `[wasm] ffmpeg ${cmd.join(" ")} (${ms} ms)`);
|
log.debug(() => `[wasm] ffmpeg ${cmd.join(" ")} (${ms} ms)`);
|
||||||
return result;
|
return result;
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in a new issue