You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/09/07 05:52:05 UTC

(opendal) branch xuanwo/remove-deno-benchmark created (now 464559bd34)

This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a change to branch xuanwo/remove-deno-benchmark
in repository https://gitbox.apache.org/repos/asf/opendal.git


      at 464559bd34 chore(bindings/nodejs): remove Deno benchmark

This branch includes the following new commits:

     new 464559bd34 chore(bindings/nodejs): remove Deno benchmark

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(opendal) 01/01: chore(bindings/nodejs): remove Deno benchmark

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch xuanwo/remove-deno-benchmark
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 464559bd349cadbc3c0851c9f03fc849b8fbc90a
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Mon Sep 7 13:51:48 2026 +0800

    chore(bindings/nodejs): remove Deno benchmark
---
 bindings/nodejs/.gitignore        |   1 -
 bindings/nodejs/benchmark/deno.ts | 115 --------------------------------------
 bindings/nodejs/package.json      |   1 -
 3 files changed, 117 deletions(-)

diff --git a/bindings/nodejs/.gitignore b/bindings/nodejs/.gitignore
index 11191fca95..52348a1160 100644
--- a/bindings/nodejs/.gitignore
+++ b/bindings/nodejs/.gitignore
@@ -9,7 +9,6 @@ npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
 lerna-debug.log*
-deno.lock
 
 # Diagnostic reports (https://nodejs.org/api/report.html)
 report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
diff --git a/bindings/nodejs/benchmark/deno.ts b/bindings/nodejs/benchmark/deno.ts
deleted file mode 100644
index 47229fcf49..0000000000
--- a/bindings/nodejs/benchmark/deno.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { Operator } from '../index.mjs'
-import 'jsr:@std/dotenv/load'
-import { S3Client } from 'jsr:@bradenmacdonald/s3-lite-client'
-
-const endpoint = Deno.env.get('AWS_S3_ENDPOINT') || 'http://localhost:9000'
-const url = new URL(endpoint)
-const port = url.port ? parseInt(url.port) : 9000
-const hostname = url.hostname
-const bucket = Deno.env.get('AWS_BUCKET') || 'benchmark'
-
-const s3 = new S3Client({
-  endPoint: hostname,
-  useSSL: false,
-  port: port,
-  region: Deno.env.get('AWS_REGION') || 'us-east-1',
-  bucket,
-  accessKey: Deno.env.get('AWS_ACCESS_KEY_ID'),
-  secretKey: Deno.env.get('AWS_SECRET_ACCESS_KEY'),
-})
-
-const opendal = new Operator('s3', {
-  root: '/',
-  bucket,
-  endpoint,
-})
-
-const files = [
-  {
-    name: '4kb',
-    file: new Uint8Array(4 * 1024),
-  },
-  {
-    name: '256kb',
-    file: new Uint8Array(256 * 1024),
-  },
-  {
-    name: '4mb',
-    file: new Uint8Array(4 * 1024 * 1024),
-  },
-  {
-    name: '16mb',
-    file: new Uint8Array(16 * 1024 * 1024),
-  },
-]
-
-const textDecoder = new TextDecoder()
-const filenames = await Promise.all(
-  files.map(async (data) => {
-    const filename = `${crypto.randomUUID()}-${data.name}-read-bench`
-    await s3.putObject(filename, textDecoder.decode(data.file))
-    return filename
-  }),
-)
-files.map((data, i) => {
-  Deno.bench(
-    `opendal: read ${data.name}`,
-    {
-      group: `read ${data.name}`,
-    },
-    async () => {
-      await opendal.read(filenames[i])
-    },
-  )
-  Deno.bench(
-    `s3: read ${data.name}`,
-    {
-      group: `read ${data.name}`,
-    },
-    async () => {
-      await s3.getObject(filenames[i])
-    },
-  )
-})
-
-files.map((data) => {
-  Deno.bench(
-    `s3: write ${data.name}`,
-    {
-      group: `write ${data.name}`,
-    },
-    async () => {
-      const filename = `${crypto.randomUUID()}-${data.name}}-s3`
-      await s3.putObject(filename, textDecoder.decode(data.file))
-    },
-  )
-  Deno.bench(
-    `opendal: write ${data.name}`,
-    {
-      group: `write ${data.name}`,
-    },
-    async () => {
-      const filename = `${crypto.randomUUID()}-${data.name}}-opendal`
-      await opendal.write(filename, textDecoder.decode(data.file))
-    },
-  )
-})
diff --git a/bindings/nodejs/package.json b/bindings/nodejs/package.json
index 0efc4d9028..41fd5bb7d4 100644
--- a/bindings/nodejs/package.json
+++ b/bindings/nodejs/package.json
@@ -91,7 +91,6 @@
     "format": "prettier --write .",
     "test": "vitest",
     "bench": "node -r dotenv/config ./benchmark/node.js dotenv_config_path=./.env",
-    "bench:deno": "deno bench --unstable-detect-cjs ./benchmark/deno.ts --allow-read --allow-ffi --allow-net --allow-env",
     "prepublishOnly": "napi prepublish -t npm --no-gh-release"
   },
   "prettier": {