|
16 | 16 | */ |
17 | 17 |
|
18 | 18 | import { Glob as OgGlob } from 'glob' |
19 | | -import { Glob, globSync, glob } from '../../js/index.js' |
| 19 | +import { Glob, globSync } from '../../js/index.js' |
20 | 20 |
|
21 | 21 | const SMALL_CWD = './benches/fixtures/small' |
22 | 22 | const MEDIUM_CWD = './benches/fixtures/medium' |
@@ -350,10 +350,10 @@ async function benchmarkWalkMethods(): Promise<MethodComparisonResult[]> { |
350 | 350 |
|
351 | 351 | // Benchmark walk (async) |
352 | 352 | const asyncTimes: number[] = [] |
353 | | - let asyncResults: string[] = [] |
| 353 | + let _asyncResults: string[] = [] |
354 | 354 | for (let i = 0; i < runs; i++) { |
355 | 355 | const start = performance.now() |
356 | | - asyncResults = await g.walk() |
| 356 | + _asyncResults = await g.walk() |
357 | 357 | asyncTimes.push(performance.now() - start) |
358 | 358 | } |
359 | 359 |
|
@@ -442,10 +442,10 @@ async function benchmarkStreamMethods(): Promise<MethodComparisonResult[]> { |
442 | 442 |
|
443 | 443 | // Benchmark stream (async) |
444 | 444 | const asyncTimes: number[] = [] |
445 | | - let asyncResults: string[] = [] |
| 445 | + let _asyncResults: string[] = [] |
446 | 446 | for (let i = 0; i < runs; i++) { |
447 | 447 | const start = performance.now() |
448 | | - asyncResults = await consumeStream(g.stream()) |
| 448 | + _asyncResults = await consumeStream(g.stream()) |
449 | 449 | asyncTimes.push(performance.now() - start) |
450 | 450 | } |
451 | 451 |
|
@@ -533,15 +533,15 @@ async function benchmarkIterateMethods(): Promise<MethodComparisonResult[]> { |
533 | 533 |
|
534 | 534 | // Benchmark iterate (async) |
535 | 535 | const asyncTimes: number[] = [] |
536 | | - let asyncCount = 0 |
| 536 | + let _asyncCount = 0 |
537 | 537 | for (let i = 0; i < runs; i++) { |
538 | 538 | const results: string[] = [] |
539 | 539 | const start = performance.now() |
540 | 540 | for await (const r of g.iterate()) { |
541 | 541 | results.push(r) |
542 | 542 | } |
543 | 543 | asyncTimes.push(performance.now() - start) |
544 | | - asyncCount = results.length |
| 544 | + _asyncCount = results.length |
545 | 545 | } |
546 | 546 |
|
547 | 547 | const syncMedian = median(syncTimes) |
@@ -628,15 +628,15 @@ async function benchmarkSymbolIterators(): Promise<MethodComparisonResult[]> { |
628 | 628 |
|
629 | 629 | // Benchmark for await...of (Symbol.asyncIterator) |
630 | 630 | const asyncTimes: number[] = [] |
631 | | - let asyncCount = 0 |
| 631 | + let _asyncCount = 0 |
632 | 632 | for (let i = 0; i < runs; i++) { |
633 | 633 | const results: string[] = [] |
634 | 634 | const start = performance.now() |
635 | 635 | for await (const r of g) { |
636 | 636 | results.push(r) |
637 | 637 | } |
638 | 638 | asyncTimes.push(performance.now() - start) |
639 | | - asyncCount = results.length |
| 639 | + _asyncCount = results.length |
640 | 640 | } |
641 | 641 |
|
642 | 642 | const syncMedian = median(syncTimes) |
|
0 commit comments