summary refs log tree commit diff
path: root/scripts/benchmark
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scripts/benchmark.js6
-rw-r--r--scripts/benchmark/connections.js6
-rw-r--r--scripts/benchmark/users.js4
3 files changed, 7 insertions, 9 deletions
diff --git a/scripts/benchmark.js b/scripts/benchmark.js

index e7435191..53db92c5 100644 --- a/scripts/benchmark.js +++ b/scripts/benchmark.js
@@ -3,9 +3,7 @@ const Models = require("../dist/entities"); const { PrimaryColumn } = require("typeorm"); function shouldIncludeEntity(name) { - return ![Models.BaseClassWithoutId, PrimaryColumn, Models.BaseClass, Models.PrimaryGeneratedColumn] - .map((x) => x?.name) - .includes(name); + return ![Models.BaseClassWithoutId, PrimaryColumn, Models.BaseClass, Models.PrimaryGeneratedColumn].map((x) => x?.name).includes(name); } async function main() { @@ -14,7 +12,7 @@ async function main() { type: "sqlite", database: ":memory:", entities: Object.values(Models).filter((x) => x.constructor.name == "Function" && shouldIncludeEntity(x.name)), - synchronize: true, + synchronize: true }); await db.initialize(); console.log("Initialized database"); diff --git a/scripts/benchmark/connections.js b/scripts/benchmark/connections.js
index 661548c3..f74d0c6d 100644 --- a/scripts/benchmark/connections.js +++ b/scripts/benchmark/connections.js
@@ -8,7 +8,7 @@ let cores = 1; try { cores = Number(process.env.THREADS) || os.cpus().length; } catch { - console.log("[Bundle] Failed to get thread count! Using 1...") + console.log("[Bundle] Failed to get thread count! Using 1..."); } if (!token) { @@ -46,8 +46,8 @@ function connect() { op: 2, d: { token, - properties: {}, - }, + properties: {} + } }) ); diff --git a/scripts/benchmark/users.js b/scripts/benchmark/users.js
index bce67bf4..415d6d8b 100644 --- a/scripts/benchmark/users.js +++ b/scripts/benchmark/users.js
@@ -14,9 +14,9 @@ async function main() { consent: true, date_of_birth: "2000-01-01", gift_code_sku_id: null, - captcha_key: null, + captcha_key: null }), - headers: { "content-type": "application/json" }, + headers: { "content-type": "application/json" } }); console.log(i); }