From cdec489cab320055990d86299b864b59c9ae0f4b Mon Sep 17 00:00:00 2001 From: Alexey Timin Date: Sat, 28 Oct 2023 00:55:08 +0200 Subject: [PATCH] update deps --- Dockerfile | 2 +- index.mjs | 14 +++++--------- package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3e593b..a061aec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:17-slim +FROM node:18-slim COPY package.json . COPY package-lock.json . diff --git a/index.mjs b/index.mjs index 61564cb..a67ba2c 100644 --- a/index.mjs +++ b/index.mjs @@ -1,17 +1,15 @@ -import {Client, QuotaType} from 'reduct-js'; +import {Client} from 'reduct-js'; import crypto from 'crypto'; import md5 from 'md5'; const serverUrl = process.env.REDUCT_STORAGE_URL; const apiToken = process.env.REDUCT_API_TOKEN; -const size30Gb = 30_000_000_000; const entryName = 'test-entry'; const intervalMs = process.env.TIME_INTERVAL ? process.env.TIME_INTERVAL : 1000; console.log(`Server URL ${serverUrl}`); -const clientReader = new Client(serverUrl, {apiToken: apiToken}); -const clientWriter = new Client(serverUrl, {apiToken: apiToken}); +const client = new Client(serverUrl, {apiToken: apiToken}); const bigBlob = crypto.randomBytes(2 ** 20); @@ -40,8 +38,7 @@ const reader = async (bucket) => { await sleep(1000); while (true) { const entryInfo = await bucket.getEntryList(); - const info = entryInfo.find(entry => entry.name === entryName); - + entryInfo.find(entry => entry.name === entryName); console.info('query'); for await (const record of bucket.query(entryName)) { const now = Date.now(); @@ -62,8 +59,7 @@ const reader = async (bucket) => { console.log(`IO interval ${intervalMs} ms`); -clientWriter.getOrCreateBucket('stress_test', - {quotaType: QuotaType.FIFO, quotaSize: size30Gb}).then(async (bucket) => { +client.getBucket('stress_test').then(async (bucket) => { console.info('Run writer'); await writer(bucket); }).catch((err) => { @@ -71,7 +67,7 @@ clientWriter.getOrCreateBucket('stress_test', process.exit(-1); }); -clientReader.getBucket('stress_test').then(async (bucket) => { +client.getBucket('stress_test').then(async (bucket) => { console.info('Run reader'); await reader(bucket); }).catch((err) => { diff --git a/package-lock.json b/package-lock.json index 59d5447..7201f2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "md5": "^2.3.0", - "reduct-js": "1.4.1" + "reduct-js": "1.7.2" } }, "node_modules/asynckit": { @@ -145,9 +145,9 @@ } }, "node_modules/reduct-js": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/reduct-js/-/reduct-js-1.4.1.tgz", - "integrity": "sha512-CkDrMo2jg0zrDsaY18Li8+rFgX2URmPVuZWmxjPs2KzuVO4SiT8cWCzzcnUU7S3vB78g6SUveTbu508Sc+z59Q==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/reduct-js/-/reduct-js-1.7.2.tgz", + "integrity": "sha512-oQa5j4UNTgYMV1lopCE0zjZ/sSZQGw9AWihbRtdliI1WJI1Kj/bqtms7fEBp1A9Q2OT6w1LFXNfvEWSoDQ4JpQ==", "dependencies": { "axios": "^0.27.2", "json-bigint": "^1.0.0" @@ -249,9 +249,9 @@ } }, "reduct-js": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/reduct-js/-/reduct-js-1.4.1.tgz", - "integrity": "sha512-CkDrMo2jg0zrDsaY18Li8+rFgX2URmPVuZWmxjPs2KzuVO4SiT8cWCzzcnUU7S3vB78g6SUveTbu508Sc+z59Q==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/reduct-js/-/reduct-js-1.7.2.tgz", + "integrity": "sha512-oQa5j4UNTgYMV1lopCE0zjZ/sSZQGw9AWihbRtdliI1WJI1Kj/bqtms7fEBp1A9Q2OT6w1LFXNfvEWSoDQ4JpQ==", "requires": { "axios": "^0.27.2", "json-bigint": "^1.0.0" diff --git a/package.json b/package.json index 4dc8956..f452083 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,6 @@ "homepage": "https://github.com/reduct-storage/data-checker#readme", "dependencies": { "md5": "^2.3.0", - "reduct-js": "1.4.1" + "reduct-js": "1.7.2" } }