mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Print task run duration time
This commit is contained in:
@@ -172,7 +172,12 @@ const ADGUARD_FILTERS = /** @type {const} */([
|
||||
// GameConsoleAdblockList
|
||||
'https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txt',
|
||||
// PiHoleBlocklist
|
||||
'https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txt',
|
||||
[
|
||||
'https://perflyst.github.io/PiHoleBlocklist/SmartTV-AGH.txt',
|
||||
[
|
||||
'https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txt'
|
||||
]
|
||||
],
|
||||
// Spam404
|
||||
'https://raw.githubusercontent.com/Spam404/lists/master/adblock-list.txt',
|
||||
// BarbBlock
|
||||
|
||||
15
Build/lib/trace-runner.js
Normal file
15
Build/lib/trace-runner.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const path = require('path');
|
||||
|
||||
/**
|
||||
* @param {Function} fn
|
||||
* @param {string} __filename
|
||||
*/
|
||||
module.exports.runner = async (__filename, fn) => {
|
||||
const runnerName = path.basename(__filename, path.extname(__filename));
|
||||
|
||||
const start = Date.now();
|
||||
const result = await fn();
|
||||
const end = Date.now();
|
||||
console.log(`⌛ [${runnerName}]: ${end - start}ms`);
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user