Skip to content

Commit b87ac78

Browse files
--wip-- [skip ci]
1 parent 136e267 commit b87ac78

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/tinybench-plugin/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const taskUriMap = new WeakMap<Bench, Map<string, string>>();
2222

2323
export function withCodSpeed(bench: Bench): Bench {
2424
const measurementMode = getMeasurementMode();
25-
console.log("Measurement mode:", measurementMode);
2625
const rootCallingFile = getCallingFile();
2726

2827
// Initialize URI mapping for this bench instance
@@ -42,7 +41,10 @@ export function withCodSpeed(bench: Bench): Bench {
4241
};
4342

4443
// Apply the appropriate measurement strategy based on mode and instrumentation
45-
if (measurementMode === MeasurementMode.Instrumentation) {
44+
if (
45+
measurementMode === MeasurementMode.Instrumentation &&
46+
Measurement.isInstrumented()
47+
) {
4648
runInstrumentedBench(bench, rootCallingFile);
4749
} else if (measurementMode === MeasurementMode.WallTime) {
4850
runWalltimeBench(bench, rootCallingFile);

0 commit comments

Comments
 (0)