@codspeed/tinybench-plugin 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -189,8 +189,14 @@ function withCodSpeed(bench) {
189
189
  const rootCallingFile = getCallingFile();
190
190
  bench.run = async () => {
191
191
  core.setupCore();
192
- console.log(`[CodSpeed] running with @codspeed/tinybench v${"2.0.0"}`);
192
+ console.log(`[CodSpeed] running with @codspeed/tinybench v${"2.1.0"}`);
193
193
  for (const task of bench.tasks) {
194
+ if (task.opts.beforeAll != null) {
195
+ await task.opts.beforeAll.call(task);
196
+ }
197
+ if (task.opts.beforeEach != null) {
198
+ await task.opts.beforeEach.call(task);
199
+ }
194
200
  const uri = isCodSpeedBenchOptions(task.opts) ? task.opts.uri : `${rootCallingFile}::${task.name}`;
195
201
  await core.optimizeFunction(task.fn);
196
202
  await async function __codspeed_root_frame__() {
@@ -198,6 +204,12 @@ function withCodSpeed(bench) {
198
204
  await task.fn();
199
205
  core.Measurement.stopInstrumentation(uri);
200
206
  }();
207
+ if (task.opts.afterEach != null) {
208
+ await task.opts.afterEach.call(task);
209
+ }
210
+ if (task.opts.afterAll != null) {
211
+ await task.opts.afterAll.call(task);
212
+ }
201
213
  console.log(` \u2714 Measured ${uri}`);
202
214
  }
203
215
  console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/stack-trace@1.0.0-pre2/node_modules/stack-trace/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","export function get(belowFn) {\r\n const oldLimit = Error.stackTraceLimit;\r\n Error.stackTraceLimit = Infinity;\r\n\r\n const dummyObject = {};\r\n\r\n const v8Handler = Error.prepareStackTrace;\r\n Error.prepareStackTrace = function(dummyObject, v8StackTrace) {\r\n return v8StackTrace;\r\n };\r\n Error.captureStackTrace(dummyObject, belowFn || get);\r\n\r\n const v8StackTrace = dummyObject.stack;\r\n Error.prepareStackTrace = v8Handler;\r\n Error.stackTraceLimit = oldLimit;\r\n\r\n return v8StackTrace;\r\n}\r\n\r\nexport function parse(err) {\r\n if (!err.stack) {\r\n return [];\r\n }\r\n\r\n const lines = err.stack.split('\\n').slice(1);\r\n return lines\r\n .map(function(line) {\r\n if (line.match(/^\\s*[-]{4,}$/)) {\r\n return createParsedCallSite({\r\n fileName: line,\r\n lineNumber: null,\r\n functionName: null,\r\n typeName: null,\r\n methodName: null,\r\n columnNumber: null,\r\n 'native': null,\r\n });\r\n }\r\n\r\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\r\n if (!lineMatch) {\r\n return;\r\n }\r\n\r\n let object = null;\r\n let method = null;\r\n let functionName = null;\r\n let typeName = null;\r\n let methodName = null;\r\n let isNative = (lineMatch[5] === 'native');\r\n\r\n if (lineMatch[1]) {\r\n functionName = lineMatch[1];\r\n let methodStart = functionName.lastIndexOf('.');\r\n if (functionName[methodStart-1] == '.')\r\n methodStart--;\r\n if (methodStart > 0) {\r\n object = functionName.substr(0, methodStart);\r\n method = functionName.substr(methodStart + 1);\r\n const objectEnd = object.indexOf('.Module');\r\n if (objectEnd > 0) {\r\n functionName = functionName.substr(objectEnd + 1);\r\n object = object.substr(0, objectEnd);\r\n }\r\n }\r\n }\r\n\r\n if (method) {\r\n typeName = object;\r\n methodName = method;\r\n }\r\n\r\n if (method === '<anonymous>') {\r\n methodName = null;\r\n functionName = null;\r\n }\r\n\r\n const properties = {\r\n fileName: lineMatch[2] || null,\r\n lineNumber: parseInt(lineMatch[3], 10) || null,\r\n functionName: functionName,\r\n typeName: typeName,\r\n methodName: methodName,\r\n columnNumber: parseInt(lineMatch[4], 10) || null,\r\n 'native': isNative,\r\n };\r\n\r\n return createParsedCallSite(properties);\r\n })\r\n .filter(function(callSite) {\r\n return !!callSite;\r\n });\r\n}\r\n\r\nfunction CallSite(properties) {\r\n for (const property in properties) {\r\n this[property] = properties[property];\r\n }\r\n}\r\n\r\nconst strProperties = [\r\n 'this',\r\n 'typeName',\r\n 'functionName',\r\n 'methodName',\r\n 'fileName',\r\n 'lineNumber',\r\n 'columnNumber',\r\n 'function',\r\n 'evalOrigin'\r\n];\r\n\r\nconst boolProperties = [\r\n 'topLevel',\r\n 'eval',\r\n 'native',\r\n 'constructor'\r\n];\r\n\r\nstrProperties.forEach(function (property) {\r\n CallSite.prototype[property] = null;\r\n CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nboolProperties.forEach(function (property) {\r\n CallSite.prototype[property] = false;\r\n CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nfunction createParsedCallSite(properties) {\r\n return new CallSite(properties);\r\n}\r\n","import {\n Measurement,\n optimizeFunction,\n setupCore,\n teardownCore,\n} from \"@codspeed/core\";\nimport { findUpSync, Options } from \"find-up\";\nimport path, { dirname } from \"path\";\nimport { get as getStackTrace } from \"stack-trace\";\nimport { Bench, Task } from \"tinybench\";\nimport { fileURLToPath } from \"url\";\n\ndeclare const __VERSION__: string;\n\ntype CodSpeedBenchOptions = Task[\"opts\"] & {\n uri: string;\n};\n\nfunction isCodSpeedBenchOptions(\n options: Task[\"opts\"]\n): options is CodSpeedBenchOptions {\n return \"uri\" in options;\n}\n\nexport function withCodSpeed(bench: Bench): Bench {\n if (!Measurement.isInstrumented()) {\n const rawRun = bench.run;\n bench.run = async () => {\n console.warn(\n `[CodSpeed] ${bench.tasks.length} benches detected but no instrumentation found, falling back to tinybench`\n );\n return await rawRun.bind(bench)();\n };\n return bench;\n }\n\n const rawAdd = bench.add;\n bench.add = (name, fn, opts: CodSpeedBenchOptions) => {\n const callingFile = getCallingFile();\n const uri = `${callingFile}::${name}`;\n const options = Object.assign({}, opts ?? {}, { uri });\n return rawAdd.bind(bench)(name, fn, options);\n };\n const rootCallingFile = getCallingFile();\n\n bench.run = async () => {\n setupCore();\n console.log(`[CodSpeed] running with @codspeed/tinybench v${__VERSION__}`);\n for (const task of bench.tasks) {\n const uri = isCodSpeedBenchOptions(task.opts)\n ? task.opts.uri\n : `${rootCallingFile}::${task.name}`;\n await optimizeFunction(task.fn);\n await (async function __codspeed_root_frame__() {\n Measurement.startInstrumentation();\n await task.fn();\n Measurement.stopInstrumentation(uri);\n })();\n console.log(` ✔ Measured ${uri}`);\n }\n console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);\n return bench.tasks;\n };\n teardownCore();\n return bench;\n}\n\nfunction getCallingFile(): string {\n const stack = getStackTrace();\n let callingFile = stack[2].getFileName(); // [here, withCodSpeed, actual caller]\n const gitDir = getGitDir(callingFile);\n if (gitDir === undefined) {\n throw new Error(\"Could not find a git repository\");\n }\n if (callingFile.startsWith(\"file://\")) {\n callingFile = fileURLToPath(callingFile);\n }\n return path.relative(gitDir, callingFile);\n}\n\nfunction getGitDir(path: string): string | undefined {\n const dotGitPath = findUpSync(\".git\", {\n cwd: path,\n type: \"directory\",\n } as Options);\n return dotGitPath ? dirname(dotGitPath) : undefined;\n}\n"],"names":["toPath","fileURLToPath","Measurement","setupCore","optimizeFunction","teardownCore","getStackTrace","path","dirname"],"mappings":";;;;;;;;;;AAMA,MAAM,YAAY,GAAG;AACrB,CAAC,SAAS,EAAE,aAAa;AACzB,CAAC,IAAI,EAAE,QAAQ;AACf,CAAC,CAAC;AACF;AACA,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrD,EAAE,OAAO;AACT,EAAE;AACF;AACA,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AAC7D;AACA,MAAMA,QAAM,GAAG,SAAS,IAAI,SAAS,YAAY,GAAG,GAAGC,sBAAa,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AA0B5F;AACO,SAAS,cAAc;AAC9B,CAAC,KAAK;AACN,CAAC;AACD,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACrB,EAAE,IAAI,GAAG,MAAM;AACf,EAAE,aAAa,GAAG,IAAI;AACtB,EAAE,GAAG,EAAE;AACP,EAAE;AACF,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,GAAG,GAAGD,QAAM,CAAC,GAAG,CAAC,CAAC;AACnB;AACA,CAAC,MAAM,YAAY,GAAG,aAAa,GAAG,EAAE,CAAC,QAAQ,GAAG,EAAE,CAAC,SAAS,CAAC;AACjE;AACA,CAAC,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE;AAC5B,EAAE,IAAI;AACN,GAAG,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,C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A;AACT,CAAA;AAEA,SAAS,cAAyB,GAAA;AAChC,EAAA,MAAM,QAAQC,GAAc,EAAA,CAAA;AAC5B,EAAA,IAAI,WAAc,GAAA,KAAA,CAAM,CAAC,CAAA,CAAE,WAAY,EAAA,CAAA;AACvC,EAAM,MAAA,MAAA,GAAS,UAAU,WAAW,CAAA,CAAA;AACpC,EAAA,IAAI,WAAW,KAAW,CAAA,EAAA;AACxB,IAAM,MAAA,IAAI,MAAM,iCAAiC,CAAA,CAAA;AAAA,GACnD;AACA,EAAI,IAAA,WAAA,CAAY,UAAW,CAAA,SAAS,CAAG,EAAA;AACrC,IAAA,WAAA,GAAcL,kBAAc,WAAW,CAAA,CAAA;AAAA,GACzC;AACA,EAAO,OAAAM,MAAA,CAAK,QAAS,CAAA,MAAA,EAAQ,WAAW,CAAA,CAAA;AAC1C,CAAA;AAEA,SAAS,UAAUA,KAAkC,EAAA;AACnD,EAAM,MAAA,UAAA,GAAa,WAAW,MAAQ,EAAA;AAAA,IACpC,GAAKA,EAAAA,KAAAA;AAAA,IACL,IAAM,EAAA,WAAA;AAAA,GACI,CAAA,CAAA;AACZ,EAAO,OAAA,UAAA,GAAaC,cAAQ,CAAA,UAAU,CAAI,GAAA,KAAA,CAAA,CAAA;AAC5C;;;;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/stack-trace@1.0.0-pre2/node_modules/stack-trace/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","export function get(belowFn) {\r\n const oldLimit = Error.stackTraceLimit;\r\n Error.stackTraceLimit = Infinity;\r\n\r\n const dummyObject = {};\r\n\r\n const v8Handler = Error.prepareStackTrace;\r\n Error.prepareStackTrace = function(dummyObject, v8StackTrace) {\r\n return v8StackTrace;\r\n };\r\n Error.captureStackTrace(dummyObject, belowFn || get);\r\n\r\n const v8StackTrace = dummyObject.stack;\r\n Error.prepareStackTrace = v8Handler;\r\n Error.stackTraceLimit = oldLimit;\r\n\r\n return v8StackTrace;\r\n}\r\n\r\nexport function parse(err) {\r\n if (!err.stack) {\r\n return [];\r\n }\r\n\r\n const lines = err.stack.split('\\n').slice(1);\r\n return lines\r\n .map(function(line) {\r\n if (line.match(/^\\s*[-]{4,}$/)) {\r\n return createParsedCallSite({\r\n fileName: line,\r\n lineNumber: null,\r\n functionName: null,\r\n typeName: null,\r\n methodName: null,\r\n columnNumber: null,\r\n 'native': null,\r\n });\r\n }\r\n\r\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\r\n if (!lineMatch) {\r\n return;\r\n }\r\n\r\n let object = null;\r\n let method = null;\r\n let functionName = null;\r\n let typeName = null;\r\n let methodName = null;\r\n let isNative = (lineMatch[5] === 'native');\r\n\r\n if (lineMatch[1]) {\r\n functionName = lineMatch[1];\r\n let methodStart = functionName.lastIndexOf('.');\r\n if (functionName[methodStart-1] == '.')\r\n methodStart--;\r\n if (methodStart > 0) {\r\n object = functionName.substr(0, methodStart);\r\n method = functionName.substr(methodStart + 1);\r\n const objectEnd = object.indexOf('.Module');\r\n if (objectEnd > 0) {\r\n functionName = functionName.substr(objectEnd + 1);\r\n object = object.substr(0, objectEnd);\r\n }\r\n }\r\n }\r\n\r\n if (method) {\r\n typeName = object;\r\n methodName = method;\r\n }\r\n\r\n if (method === '<anonymous>') {\r\n methodName = null;\r\n functionName = null;\r\n }\r\n\r\n const properties = {\r\n fileName: lineMatch[2] || null,\r\n lineNumber: parseInt(lineMatch[3], 10) || null,\r\n functionName: functionName,\r\n typeName: typeName,\r\n methodName: methodName,\r\n columnNumber: parseInt(lineMatch[4], 10) || null,\r\n 'native': isNative,\r\n };\r\n\r\n return createParsedCallSite(properties);\r\n })\r\n .filter(function(callSite) {\r\n return !!callSite;\r\n });\r\n}\r\n\r\nfunction CallSite(properties) {\r\n for (const property in properties) {\r\n this[property] = properties[property];\r\n }\r\n}\r\n\r\nconst strProperties = [\r\n 'this',\r\n 'typeName',\r\n 'functionName',\r\n 'methodName',\r\n 'fileName',\r\n 'lineNumber',\r\n 'columnNumber',\r\n 'function',\r\n 'evalOrigin'\r\n];\r\n\r\nconst boolProperties = [\r\n 'topLevel',\r\n 'eval',\r\n 'native',\r\n 'constructor'\r\n];\r\n\r\nstrProperties.forEach(function (property) {\r\n CallSite.prototype[property] = null;\r\n CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nboolProperties.forEach(function (property) {\r\n CallSite.prototype[property] = false;\r\n CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nfunction createParsedCallSite(properties) {\r\n return new CallSite(properties);\r\n}\r\n","import {\n Measurement,\n optimizeFunction,\n setupCore,\n teardownCore,\n} from \"@codspeed/core\";\nimport { findUpSync, Options } from \"find-up\";\nimport path, { dirname } from \"path\";\nimport { get as getStackTrace } from \"stack-trace\";\nimport { Bench, Task } from \"tinybench\";\nimport { fileURLToPath } from \"url\";\n\ndeclare const __VERSION__: string;\n\ntype CodSpeedBenchOptions = Task[\"opts\"] & {\n uri: string;\n};\n\nfunction isCodSpeedBenchOptions(\n options: Task[\"opts\"]\n): options is CodSpeedBenchOptions {\n return \"uri\" in options;\n}\n\nexport function withCodSpeed(bench: Bench): Bench {\n if (!Measurement.isInstrumented()) {\n const rawRun = bench.run;\n bench.run = async () => {\n console.warn(\n `[CodSpeed] ${bench.tasks.length} benches detected but no instrumentation found, falling back to tinybench`\n );\n return await rawRun.bind(bench)();\n };\n return bench;\n }\n\n const rawAdd = bench.add;\n bench.add = (name, fn, opts: CodSpeedBenchOptions) => {\n const callingFile = getCallingFile();\n const uri = `${callingFile}::${name}`;\n const options = Object.assign({}, opts ?? {}, { uri });\n return rawAdd.bind(bench)(name, fn, options);\n };\n const rootCallingFile = getCallingFile();\n\n bench.run = async () => {\n setupCore();\n console.log(`[CodSpeed] running with @codspeed/tinybench v${__VERSION__}`);\n for (const task of bench.tasks) {\n // run before hooks\n if (task.opts.beforeAll != null) {\n await task.opts.beforeAll.call(task);\n }\n if (task.opts.beforeEach != null) {\n await task.opts.beforeEach.call(task);\n }\n\n // run the actual benchmark, with instrumentation\n const uri = isCodSpeedBenchOptions(task.opts)\n ? task.opts.uri\n : `${rootCallingFile}::${task.name}`;\n await optimizeFunction(task.fn);\n await (async function __codspeed_root_frame__() {\n Measurement.startInstrumentation();\n await task.fn();\n Measurement.stopInstrumentation(uri);\n })();\n\n // run after hooks\n if (task.opts.afterEach != null) {\n await task.opts.afterEach.call(task);\n }\n if (task.opts.afterAll != null) {\n await task.opts.afterAll.call(task);\n }\n\n // print results\n console.log(` ✔ Measured ${uri}`);\n }\n console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);\n return bench.tasks;\n };\n teardownCore();\n return bench;\n}\n\nfunction getCallingFile(): string {\n const stack = getStackTrace();\n let callingFile = stack[2].getFileName(); // [here, withCodSpeed, actual caller]\n const gitDir = getGitDir(callingFile);\n if (gitDir === undefined) {\n throw new Error(\"Could not find a git repository\");\n }\n if (callingFile.startsWith(\"file://\")) {\n callingFile = fileURLToPath(callingFile);\n }\n return path.relative(gitDir, callingFile);\n}\n\nfunction getGitDir(path: string): string | undefined {\n const dotGitPath = findUpSync(\".git\", {\n cwd: path,\n type: \"directory\",\n } as Options);\n return dotGitPath ? dirname(dotGitPath) : undefined;\n}\n"],"names":["toPath","fileURLToPath","Measurement","setupCore","optimizeFunction","teardownCore","getStackTrace","path","dirname"],"mappings":";;;;;;;;;;AAMA,MAAM,YAAY,GAAG;AACrB,CAAC,SAAS,EAAE,aAAa;AACzB,CAAC,IAAI,EAAE,QAAQ;AACf,CAAC,CAAC;AACF;AACA,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrD,EAAE,OAAO;AACT,EAAE;AACF;AACA,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AAC7D;AACA,MAAMA,QAAM,GAAG,SAAS,IAAI,SAAS,YAAY,GAAG,GAAGC,sBAAa,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AA0B5F;AACO,SAAS,cAAc;AAC9B,CAAC,KAAK;AACN,CAAC;AACD,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACrB,EAAE,IAAI,GAAG,MAAM;AACf,EAAE,aAAa,GAAG,IAAI;AACtB,EAAE,GAAG,EAAE;AACP,EAAE;AACF,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,GAAG,GAAGD,QAAM,CAAC,GAAG,CAAC,CAAC;AACnB;AACA,CAAC,MAAM,YAAY,GAAG,aAAa,GAAG,EAAE,CAAC,QAAQ,GAAG,EAA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A;AAAA,GACzC;AACA,EAAO,OAAAM,MAAA,CAAK,QAAS,CAAA,MAAA,EAAQ,WAAW,CAAA,CAAA;AAC1C,CAAA;AAEA,SAAS,UAAUA,KAAkC,EAAA;AACnD,EAAM,MAAA,UAAA,GAAa,WAAW,MAAQ,EAAA;AAAA,IACpC,GAAKA,EAAAA,KAAAA;AAAA,IACL,IAAM,EAAA,WAAA;AAAA,GACI,CAAA,CAAA;AACZ,EAAO,OAAA,UAAA,GAAaC,cAAQ,CAAA,UAAU,CAAI,GAAA,KAAA,CAAA,CAAA;AAC5C;;;;","x_google_ignoreList":[0,1,2]}
package/dist/index.es5.js CHANGED
@@ -187,8 +187,14 @@ function withCodSpeed(bench) {
187
187
  const rootCallingFile = getCallingFile();
188
188
  bench.run = async () => {
189
189
  setupCore();
190
- console.log(`[CodSpeed] running with @codspeed/tinybench v${"2.0.0"}`);
190
+ console.log(`[CodSpeed] running with @codspeed/tinybench v${"2.1.0"}`);
191
191
  for (const task of bench.tasks) {
192
+ if (task.opts.beforeAll != null) {
193
+ await task.opts.beforeAll.call(task);
194
+ }
195
+ if (task.opts.beforeEach != null) {
196
+ await task.opts.beforeEach.call(task);
197
+ }
192
198
  const uri = isCodSpeedBenchOptions(task.opts) ? task.opts.uri : `${rootCallingFile}::${task.name}`;
193
199
  await optimizeFunction(task.fn);
194
200
  await async function __codspeed_root_frame__() {
@@ -196,6 +202,12 @@ function withCodSpeed(bench) {
196
202
  await task.fn();
197
203
  Measurement.stopInstrumentation(uri);
198
204
  }();
205
+ if (task.opts.afterEach != null) {
206
+ await task.opts.afterEach.call(task);
207
+ }
208
+ if (task.opts.afterAll != null) {
209
+ await task.opts.afterAll.call(task);
210
+ }
199
211
  console.log(` \u2714 Measured ${uri}`);
200
212
  }
201
213
  console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.es5.js","sources":["../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/stack-trace@1.0.0-pre2/node_modules/stack-trace/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","export function get(belowFn) {\r\n const oldLimit = Error.stackTraceLimit;\r\n Error.stackTraceLimit = Infinity;\r\n\r\n const dummyObject = {};\r\n\r\n const v8Handler = Error.prepareStackTrace;\r\n Error.prepareStackTrace = function(dummyObject, v8StackTrace) {\r\n return v8StackTrace;\r\n };\r\n Error.captureStackTrace(dummyObject, belowFn || get);\r\n\r\n const v8StackTrace = dummyObject.stack;\r\n Error.prepareStackTrace = v8Handler;\r\n Error.stackTraceLimit = oldLimit;\r\n\r\n return v8StackTrace;\r\n}\r\n\r\nexport function parse(err) {\r\n if (!err.stack) {\r\n return [];\r\n }\r\n\r\n const lines = err.stack.split('\\n').slice(1);\r\n return lines\r\n .map(function(line) {\r\n if (line.match(/^\\s*[-]{4,}$/)) {\r\n return createParsedCallSite({\r\n fileName: line,\r\n lineNumber: null,\r\n functionName: null,\r\n typeName: null,\r\n methodName: null,\r\n columnNumber: null,\r\n 'native': null,\r\n });\r\n }\r\n\r\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\r\n if (!lineMatch) {\r\n return;\r\n }\r\n\r\n let object = null;\r\n let method = null;\r\n let functionName = null;\r\n let typeName = null;\r\n let methodName = null;\r\n let isNative = (lineMatch[5] === 'native');\r\n\r\n if (lineMatch[1]) {\r\n functionName = lineMatch[1];\r\n let methodStart = functionName.lastIndexOf('.');\r\n if (functionName[methodStart-1] == '.')\r\n methodStart--;\r\n if (methodStart > 0) {\r\n object = functionName.substr(0, methodStart);\r\n method = functionName.substr(methodStart + 1);\r\n const objectEnd = object.indexOf('.Module');\r\n if (objectEnd > 0) {\r\n functionName = functionName.substr(objectEnd + 1);\r\n object = object.substr(0, objectEnd);\r\n }\r\n }\r\n }\r\n\r\n if (method) {\r\n typeName = object;\r\n methodName = method;\r\n }\r\n\r\n if (method === '<anonymous>') {\r\n methodName = null;\r\n functionName = null;\r\n }\r\n\r\n const properties = {\r\n fileName: lineMatch[2] || null,\r\n lineNumber: parseInt(lineMatch[3], 10) || null,\r\n functionName: functionName,\r\n typeName: typeName,\r\n methodName: methodName,\r\n columnNumber: parseInt(lineMatch[4], 10) || null,\r\n 'native': isNative,\r\n };\r\n\r\n return createParsedCallSite(properties);\r\n })\r\n .filter(function(callSite) {\r\n return !!callSite;\r\n });\r\n}\r\n\r\nfunction CallSite(properties) {\r\n for (const property in properties) {\r\n this[property] = properties[property];\r\n }\r\n}\r\n\r\nconst strProperties = [\r\n 'this',\r\n 'typeName',\r\n 'functionName',\r\n 'methodName',\r\n 'fileName',\r\n 'lineNumber',\r\n 'columnNumber',\r\n 'function',\r\n 'evalOrigin'\r\n];\r\n\r\nconst boolProperties = [\r\n 'topLevel',\r\n 'eval',\r\n 'native',\r\n 'constructor'\r\n];\r\n\r\nstrProperties.forEach(function (property) {\r\n CallSite.prototype[property] = null;\r\n CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nboolProperties.forEach(function (property) {\r\n CallSite.prototype[property] = false;\r\n CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nfunction createParsedCallSite(properties) {\r\n return new CallSite(properties);\r\n}\r\n","import {\n Measurement,\n optimizeFunction,\n setupCore,\n teardownCore,\n} from \"@codspeed/core\";\nimport { findUpSync, Options } from \"find-up\";\nimport path, { dirname } from \"path\";\nimport { get as getStackTrace } from \"stack-trace\";\nimport { Bench, Task } from \"tinybench\";\nimport { fileURLToPath } from \"url\";\n\ndeclare const __VERSION__: string;\n\ntype CodSpeedBenchOptions = Task[\"opts\"] & {\n uri: string;\n};\n\nfunction isCodSpeedBenchOptions(\n options: Task[\"opts\"]\n): options is CodSpeedBenchOptions {\n return \"uri\" in options;\n}\n\nexport function withCodSpeed(bench: Bench): Bench {\n if (!Measurement.isInstrumented()) {\n const rawRun = bench.run;\n bench.run = async () => {\n console.warn(\n `[CodSpeed] ${bench.tasks.length} benches detected but no instrumentation found, falling back to tinybench`\n );\n return await rawRun.bind(bench)();\n };\n return bench;\n }\n\n const rawAdd = bench.add;\n bench.add = (name, fn, opts: CodSpeedBenchOptions) => {\n const callingFile = getCallingFile();\n const uri = `${callingFile}::${name}`;\n const options = Object.assign({}, opts ?? {}, { uri });\n return rawAdd.bind(bench)(name, fn, options);\n };\n const rootCallingFile = getCallingFile();\n\n bench.run = async () => {\n setupCore();\n console.log(`[CodSpeed] running with @codspeed/tinybench v${__VERSION__}`);\n for (const task of bench.tasks) {\n const uri = isCodSpeedBenchOptions(task.opts)\n ? task.opts.uri\n : `${rootCallingFile}::${task.name}`;\n await optimizeFunction(task.fn);\n await (async function __codspeed_root_frame__() {\n Measurement.startInstrumentation();\n await task.fn();\n Measurement.stopInstrumentation(uri);\n })();\n console.log(` ✔ Measured ${uri}`);\n }\n console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);\n return bench.tasks;\n };\n teardownCore();\n return bench;\n}\n\nfunction getCallingFile(): string {\n const stack = getStackTrace();\n let callingFile = stack[2].getFileName(); // [here, withCodSpeed, actual caller]\n const gitDir = getGitDir(callingFile);\n if (gitDir === undefined) {\n throw new Error(\"Could not find a git repository\");\n }\n if (callingFile.startsWith(\"file://\")) {\n callingFile = fileURLToPath(callingFile);\n }\n return path.relative(gitDir, callingFile);\n}\n\nfunction getGitDir(path: string): string | undefined {\n const dotGitPath = findUpSync(\".git\", {\n cwd: path,\n type: \"directory\",\n } as Options);\n return dotGitPath ? dirname(dotGitPath) : undefined;\n}\n"],"names":["toPath","getStackTrace","fileURLToPath","path"],"mappings":";;;;;;;;AAMA,MAAM,YAAY,GAAG;AACrB,CAAC,SAAS,EAAE,aAAa;AACzB,CAAC,IAAI,EAAE,QAAQ;AACf,CAAC,CAAC;AACF;AACA,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrD,EAAE,OAAO;AACT,EAAE;AACF;AACA,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AAC7D;AACA,MAAMA,QAAM,GAAG,SAAS,IAAI,SAAS,YAAY,GAAG,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AA0B5F;AACO,SAAS,cAAc;AAC9B,CAAC,KAAK;AACN,CAAC;AACD,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACrB,EAAE,IAAI,GAAG,MAAM;AACf,EAAE,aAAa,GAAG,IAAI;AACtB,EAAE,GAAG,EAAE;AACP,EAAE;AACF,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC,GAAG,GAAGA,QAAM,CAAC,GAAG,CAAC,CAAC;AACnB;AACA,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I,CAAA,CAAA,wBAAA,EAA2B,KAAM,CAAA,KAAA,CAAM,MAAiB,CAAA,SAAA,CAAA,CAAA,CAAA;AACpE,IAAA,OAAO,KAAM,CAAA,KAAA,CAAA;AAAA,GACf,CAAA;AACA,EAAa,YAAA,EAAA,CAAA;AACb,EAAO,OAAA,KAAA,CAAA;AACT,CAAA;AAEA,SAAS,cAAyB,GAAA;AAChC,EAAA,MAAM,QAAQC,GAAc,EAAA,CAAA;AAC5B,EAAA,IAAI,WAAc,GAAA,KAAA,CAAM,CAAC,CAAA,CAAE,WAAY,EAAA,CAAA;AACvC,EAAM,MAAA,MAAA,GAAS,UAAU,WAAW,CAAA,CAAA;AACpC,EAAA,IAAI,WAAW,KAAW,CAAA,EAAA;AACxB,IAAM,MAAA,IAAI,MAAM,iCAAiC,CAAA,CAAA;AAAA,GACnD;AACA,EAAI,IAAA,WAAA,CAAY,UAAW,CAAA,SAAS,CAAG,EAAA;AACrC,IAAA,WAAA,GAAcC,gBAAc,WAAW,CAAA,CAAA;AAAA,GACzC;AACA,EAAO,OAAAC,MAAA,CAAK,QAAS,CAAA,MAAA,EAAQ,WAAW,CAAA,CAAA;AAC1C,CAAA;AAEA,SAAS,UAAUA,KAAkC,EAAA;AACnD,EAAM,MAAA,UAAA,GAAa,WAAW,MAAQ,EAAA;AAAA,IACpC,GAAKA,EAAAA,KAAAA;AAAA,IACL,IAAM,EAAA,WAAA;AAAA,GACI,CAAA,CAAA;AACZ,EAAO,OAAA,UAAA,GAAa,OAAQ,CAAA,UAAU,CAAI,GAAA,KAAA,CAAA,CAAA;AAC5C;;;;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index.es5.js","sources":["../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/stack-trace@1.0.0-pre2/node_modules/stack-trace/index.js","../src/index.ts"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","export function get(belowFn) {\r\n const oldLimit = Error.stackTraceLimit;\r\n Error.stackTraceLimit = Infinity;\r\n\r\n const dummyObject = {};\r\n\r\n const v8Handler = Error.prepareStackTrace;\r\n Error.prepareStackTrace = function(dummyObject, v8StackTrace) {\r\n return v8StackTrace;\r\n };\r\n Error.captureStackTrace(dummyObject, belowFn || get);\r\n\r\n const v8StackTrace = dummyObject.stack;\r\n Error.prepareStackTrace = v8Handler;\r\n Error.stackTraceLimit = oldLimit;\r\n\r\n return v8StackTrace;\r\n}\r\n\r\nexport function parse(err) {\r\n if (!err.stack) {\r\n return [];\r\n }\r\n\r\n const lines = err.stack.split('\\n').slice(1);\r\n return lines\r\n .map(function(line) {\r\n if (line.match(/^\\s*[-]{4,}$/)) {\r\n return createParsedCallSite({\r\n fileName: line,\r\n lineNumber: null,\r\n functionName: null,\r\n typeName: null,\r\n methodName: null,\r\n columnNumber: null,\r\n 'native': null,\r\n });\r\n }\r\n\r\n const lineMatch = line.match(/at (?:(.+?)\\s+\\()?(?:(.+?):(\\d+)(?::(\\d+))?|([^)]+))\\)?/);\r\n if (!lineMatch) {\r\n return;\r\n }\r\n\r\n let object = null;\r\n let method = null;\r\n let functionName = null;\r\n let typeName = null;\r\n let methodName = null;\r\n let isNative = (lineMatch[5] === 'native');\r\n\r\n if (lineMatch[1]) {\r\n functionName = lineMatch[1];\r\n let methodStart = functionName.lastIndexOf('.');\r\n if (functionName[methodStart-1] == '.')\r\n methodStart--;\r\n if (methodStart > 0) {\r\n object = functionName.substr(0, methodStart);\r\n method = functionName.substr(methodStart + 1);\r\n const objectEnd = object.indexOf('.Module');\r\n if (objectEnd > 0) {\r\n functionName = functionName.substr(objectEnd + 1);\r\n object = object.substr(0, objectEnd);\r\n }\r\n }\r\n }\r\n\r\n if (method) {\r\n typeName = object;\r\n methodName = method;\r\n }\r\n\r\n if (method === '<anonymous>') {\r\n methodName = null;\r\n functionName = null;\r\n }\r\n\r\n const properties = {\r\n fileName: lineMatch[2] || null,\r\n lineNumber: parseInt(lineMatch[3], 10) || null,\r\n functionName: functionName,\r\n typeName: typeName,\r\n methodName: methodName,\r\n columnNumber: parseInt(lineMatch[4], 10) || null,\r\n 'native': isNative,\r\n };\r\n\r\n return createParsedCallSite(properties);\r\n })\r\n .filter(function(callSite) {\r\n return !!callSite;\r\n });\r\n}\r\n\r\nfunction CallSite(properties) {\r\n for (const property in properties) {\r\n this[property] = properties[property];\r\n }\r\n}\r\n\r\nconst strProperties = [\r\n 'this',\r\n 'typeName',\r\n 'functionName',\r\n 'methodName',\r\n 'fileName',\r\n 'lineNumber',\r\n 'columnNumber',\r\n 'function',\r\n 'evalOrigin'\r\n];\r\n\r\nconst boolProperties = [\r\n 'topLevel',\r\n 'eval',\r\n 'native',\r\n 'constructor'\r\n];\r\n\r\nstrProperties.forEach(function (property) {\r\n CallSite.prototype[property] = null;\r\n CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nboolProperties.forEach(function (property) {\r\n CallSite.prototype[property] = false;\r\n CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () {\r\n return this[property];\r\n }\r\n});\r\n\r\nfunction createParsedCallSite(properties) {\r\n return new CallSite(properties);\r\n}\r\n","import {\n Measurement,\n optimizeFunction,\n setupCore,\n teardownCore,\n} from \"@codspeed/core\";\nimport { findUpSync, Options } from \"find-up\";\nimport path, { dirname } from \"path\";\nimport { get as getStackTrace } from \"stack-trace\";\nimport { Bench, Task } from \"tinybench\";\nimport { fileURLToPath } from \"url\";\n\ndeclare const __VERSION__: string;\n\ntype CodSpeedBenchOptions = Task[\"opts\"] & {\n uri: string;\n};\n\nfunction isCodSpeedBenchOptions(\n options: Task[\"opts\"]\n): options is CodSpeedBenchOptions {\n return \"uri\" in options;\n}\n\nexport function withCodSpeed(bench: Bench): Bench {\n if (!Measurement.isInstrumented()) {\n const rawRun = bench.run;\n bench.run = async () => {\n console.warn(\n `[CodSpeed] ${bench.tasks.length} benches detected but no instrumentation found, falling back to tinybench`\n );\n return await rawRun.bind(bench)();\n };\n return bench;\n }\n\n const rawAdd = bench.add;\n bench.add = (name, fn, opts: CodSpeedBenchOptions) => {\n const callingFile = getCallingFile();\n const uri = `${callingFile}::${name}`;\n const options = Object.assign({}, opts ?? {}, { uri });\n return rawAdd.bind(bench)(name, fn, options);\n };\n const rootCallingFile = getCallingFile();\n\n bench.run = async () => {\n setupCore();\n console.log(`[CodSpeed] running with @codspeed/tinybench v${__VERSION__}`);\n for (const task of bench.tasks) {\n // run before hooks\n if (task.opts.beforeAll != null) {\n await task.opts.beforeAll.call(task);\n }\n if (task.opts.beforeEach != null) {\n await task.opts.beforeEach.call(task);\n }\n\n // run the actual benchmark, with instrumentation\n const uri = isCodSpeedBenchOptions(task.opts)\n ? task.opts.uri\n : `${rootCallingFile}::${task.name}`;\n await optimizeFunction(task.fn);\n await (async function __codspeed_root_frame__() {\n Measurement.startInstrumentation();\n await task.fn();\n Measurement.stopInstrumentation(uri);\n })();\n\n // run after hooks\n if (task.opts.afterEach != null) {\n await task.opts.afterEach.call(task);\n }\n if (task.opts.afterAll != null) {\n await task.opts.afterAll.call(task);\n }\n\n // print results\n console.log(` ✔ Measured ${uri}`);\n }\n console.log(`[CodSpeed] Done running ${bench.tasks.length} benches.`);\n return bench.tasks;\n };\n teardownCore();\n return bench;\n}\n\nfunction getCallingFile(): string {\n const stack = getStackTrace();\n let callingFile = stack[2].getFileName(); // [here, withCodSpeed, actual caller]\n const gitDir = getGitDir(callingFile);\n if (gitDir === undefined) {\n throw new Error(\"Could not find a git repository\");\n }\n if (callingFile.startsWith(\"file://\")) {\n callingFile = fileURLToPath(callingFile);\n }\n return path.relative(gitDir, callingFile);\n}\n\nfunction getGitDir(path: string): string | undefined {\n const dotGitPath = findUpSync(\".git\", {\n cwd: path,\n type: \"directory\",\n } as Options);\n return dotGitPath ? dirname(dotGitPath) : undefined;\n}\n"],"names":["toPath","getStackTrace","fileURLToPath","path"],"mappings":";;;;;;;;AAMA,MAAM,YAAY,GAAG;AACrB,CAAC,SAAS,EAAE,aAAa;AACzB,CAAC,IAAI,EAAE,QAAQ;AACf,CAAC,CAAC;AACF;AACA,SAAS,SAAS,CAAC,IAAI,EAAE;AACzB,CAAC,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE;AACrD,EAAE,OAAO;AACT,EAAE;AACF;AACA,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AACD;AACA,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;AAC7D;AACA,MAAMA,QAAM,GAAG,SAAS,IAAI,SAAS,YAAY,GAAG,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AA0B5F;AACO,SAAS,cAAc;AAC9B,CAAC,KAAK;AACN,CAAC;AACD,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;AACrB,EAAE,IAAI,GAAG,MAAM;AACf,EAAE,aAAa,GAAG,IAAI;AACtB,EAAE,GAAG,EAAE;AACP,EAAE;AACF,CAA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AAI,MAAM,iCAAiC,CAAA,CAAA;AAAA,GACnD;AACA,EAAI,IAAA,WAAA,CAAY,UAAW,CAAA,SAAS,CAAG,EAAA;AACrC,IAAA,WAAA,GAAcC,gBAAc,WAAW,CAAA,CAAA;AAAA,GACzC;AACA,EAAO,OAAAC,MAAA,CAAK,QAAS,CAAA,MAAA,EAAQ,WAAW,CAAA,CAAA;AAC1C,CAAA;AAEA,SAAS,UAAUA,KAAkC,EAAA;AACnD,EAAM,MAAA,UAAA,GAAa,WAAW,MAAQ,EAAA;AAAA,IACpC,GAAKA,EAAAA,KAAAA;AAAA,IACL,IAAM,EAAA,WAAA;AAAA,GACI,CAAA,CAAA;AACZ,EAAO,OAAA,UAAA,GAAa,OAAQ,CAAA,UAAU,CAAI,GAAA,KAAA,CAAA,CAAA;AAC5C;;;;","x_google_ignoreList":[0,1,2]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codspeed/tinybench-plugin",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "tinybench compatibility layer for CodSpeed",
5
5
  "keywords": [
6
6
  "codspeed",
@@ -25,7 +25,7 @@
25
25
  "tinybench": "^2.4.0"
26
26
  },
27
27
  "dependencies": {
28
- "@codspeed/core": "^2.0.0",
28
+ "@codspeed/core": "^2.1.0",
29
29
  "find-up": "^6.3.0",
30
30
  "stack-trace": "1.0.0-pre2"
31
31
  },