mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Chore: housekeeping
This commit is contained in:
parent
2c8ac0b5ff
commit
f88c3648a2
@ -82,7 +82,7 @@ const endWorker = async <T>(worker: WithWorker<T>) => {
|
|||||||
const buildRedirectModulePromise = downloadPreviousBuildPromise.then(() => buildRedirectModule());
|
const buildRedirectModulePromise = downloadPreviousBuildPromise.then(() => buildRedirectModule());
|
||||||
const buildStreamServicePromise = downloadPreviousBuildPromise.then(() => buildStreamService());
|
const buildStreamServicePromise = downloadPreviousBuildPromise.then(() => buildStreamService());
|
||||||
|
|
||||||
const stats: Array<{ start: number, end: number, taskName: string }> = await Promise.all([
|
const stats = await Promise.all([
|
||||||
downloadPreviousBuildPromise,
|
downloadPreviousBuildPromise,
|
||||||
downloadPublicSuffixListPromise,
|
downloadPublicSuffixListPromise,
|
||||||
buildCommonPromise,
|
buildCommonPromise,
|
||||||
@ -118,13 +118,11 @@ const endWorker = async <T>(worker: WithWorker<T>) => {
|
|||||||
function printStats(stats: Array<{ start: number, end: number, taskName: string }>): void {
|
function printStats(stats: Array<{ start: number, end: number, taskName: string }>): void {
|
||||||
stats.sort((a, b) => a.start - b.start);
|
stats.sort((a, b) => a.start - b.start);
|
||||||
|
|
||||||
const longestTaskName: number = Math.max(...stats.map(i => i.taskName.length));
|
const longestTaskName = Math.max(...stats.map(i => i.taskName.length));
|
||||||
const realStart: number = Math.min(...stats.map(i => i.start));
|
const realStart = Math.min(...stats.map(i => i.start));
|
||||||
const realEnd: number = Math.max(...stats.map(i => i.end));
|
const realEnd = Math.max(...stats.map(i => i.end));
|
||||||
|
|
||||||
const totalMs: number = realEnd - realStart;
|
const statsStep = ((realEnd - realStart) / 160) | 0;
|
||||||
|
|
||||||
const statsStep: number = (totalMs / 160) | 0;
|
|
||||||
|
|
||||||
stats.forEach(stat => {
|
stats.forEach(stat => {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@ -32,13 +32,14 @@
|
|||||||
"tldts": "^6.0.19"
|
"tldts": "^6.0.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint-sukka/node": "^4.1.7",
|
"@eslint-sukka/node": "4.1.9",
|
||||||
|
"@eslint-sukka/ts": "4.1.9",
|
||||||
"@types/mocha": "10.0.2",
|
"@types/mocha": "10.0.2",
|
||||||
"@types/tar": "^6.1.9",
|
"@types/tar": "^6.1.9",
|
||||||
"bun-types": "^1.0.11",
|
"bun-types": "^1.0.11",
|
||||||
"chai": "4.3.10",
|
"chai": "4.3.10",
|
||||||
"eslint-config-sukka": "4.1.7",
|
"eslint-config-sukka": "4.1.9",
|
||||||
"eslint-formatter-sukka": "4.1.7",
|
"eslint-formatter-sukka": "4.1.9",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user