first commit
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s

This commit is contained in:
John
2026-09-23 17:31:02 +05:30
commit 69b4e68baf
51657 changed files with 3864077 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
const { createBenchmark, createConnection } = require('../common');
const { Request, TYPES } = require('../../src/tedious');
const bench = createBenchmark(main, {
n: [10, 100],
size: [
10,
100,
1000,
10000
]
});
function main({ n, size }) {
createConnection(function(connection) {
const request = new Request(`
CREATE TABLE "#tmpTestTable" (
"id" int NOT NULL
)
`, (err) => {
if (err) {
throw err;
}
let i = 0;
bench.start();
(function cb() {
const bulkLoad = connection.newBulkLoad('#tmpTestTable', (err) => {
if (err) {
throw err;
}
if (i++ === n) {
bench.end(n);
connection.close();
return;
}
cb();
});
bulkLoad.addColumn('id', TYPES.Int, { nullable: false });
for (let j = 0; j < size; j++) {
bulkLoad.addRow([ j ]);
}
connection.execBulkLoad(bulkLoad);
})();
});
connection.execSqlBatch(request);
});
}