Skip to content

Commit

Permalink
chore: fix benchmark files (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurschreiber committed Oct 1, 2023
1 parent 8c7e440 commit f4d91f1
Show file tree
Hide file tree
Showing 17 changed files with 21,214 additions and 141 deletions.
1 change: 1 addition & 0 deletions benchmarks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/*
2 changes: 1 addition & 1 deletion benchmarks/bulk-load/iterable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { createBenchmark, createConnection } = require('../common');

const { Request, TYPES } = require('../../src/tedious');
const { Request, TYPES } = require('tedious');

const bench = createBenchmark(main, {
n: [10, 100],
Expand Down
62 changes: 0 additions & 62 deletions benchmarks/bulk-load/stream.js

This file was deleted.

59 changes: 0 additions & 59 deletions benchmarks/bulk-load/sync.js

This file was deleted.

6 changes: 2 additions & 4 deletions benchmarks/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ const {
}
} = require('perf_hooks');

require('@babel/register')({ extensions: ['.ts'] });

const { Connection } = require('../src/tedious');
const { Connection } = require('tedious');

// The `Benchmark` class is taken from Node.js - see
// https://github.com/nodejs/node/blob/0f96dc266fd0cd8c1baa82ce7eb951c11b29a331/benchmark/common.js
Expand Down Expand Up @@ -65,7 +63,7 @@ function Benchmark(fn, configs, options) {

for (let i = 0; i < length; i++) {
const entry = entries[i];
const stats = this._gcStats[entry.kind];
const stats = this._gcStats[entry.detail.kind];

if (stats) {
stats.count += 1;
Expand Down
Loading

0 comments on commit f4d91f1

Please sign in to comment.