Files
sap-erp/node_modules/tedious/benchmarks/connection/open.js
T
John 69b4e68baf
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s
first commit
2026-09-23 17:31:02 +05:30

27 lines
401 B
JavaScript

const { createBenchmark, createConnection } = require('../common');
const bench = createBenchmark(main, {
n: [10, 100]
});
function main({ n }) {
let i = 0;
bench.start();
(function cb() {
createConnection(function(connection) {
connection.close();
if (i++ === n) {
bench.end(n);
connection.close();
return;
}
cb();
});
})();
}