Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a2cd00b
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
72c17d7
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
1152fb3
feat: add internal benchmarking tool to compare latency and memory fo…
thiyaguk09 May 20, 2026
8a8f635
fix(benchmark): address PR security, cleanup, and type safety comments
thiyaguk09 May 20, 2026
8eb2d72
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
eacb087
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
05f71d9
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 21, 2026
afa53c9
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 21, 2026
c0113c7
refactor: enhance benchmark tool with configurable file sizes and fle…
thiyaguk09 May 21, 2026
683b3f4
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
0c58a9a
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
679fe27
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 25, 2026
d38bfa9
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 25, 2026
2d093dd
feat(storage): enhance benchmark tool with configurable file sizes an…
thiyaguk09 May 25, 2026
b5c81a1
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
fe44861
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
d221bce
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 26, 2026
7c3ee50
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
0a4f5ac
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
8b417f9
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 May 27, 2026
0fcae7d
feat: expand benchmark tool to include stream upload, stream download…
thiyaguk09 May 27, 2026
ef7c4d4
fix(storage): standardize URL formatting and enhance transport retry
thiyaguk09 May 7, 2026
e3288e3
refactor(storage): remove Service.ts and migrate logic to StorageTran…
thiyaguk09 May 14, 2026
cfdbf08
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 Jun 1, 2026
72218c2
test: add bytes method to mock responses in acl and headers tests
thiyaguk09 Jun 1, 2026
d2d226c
feat: expand benchmark suite with additional file and bucket operatio…
thiyaguk09 Jun 2, 2026
531dd2d
Merge remote-tracking branch 'upstream/storage-node-18' into chore/34…
thiyaguk09 Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion handwritten/storage/internal-tooling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,35 @@ For each invocation of the benchmark, write a new object of random size between
| ElapsedTimeUs | the elapsed time in microseconds the operation took |
| Status | completion state of the operation [OK, FAIL] |
| AppBufferSize | N/A |
| CpuTimeUs | N/A |
| CpuTimeUs | N/A |

---

## Comparative Latency & Memory Benchmarking (`benchmark.ts`)

This benchmark compares the current codebase build against a specified baseline NPM version of `@google-cloud/storage` (e.g. comparing Gaxios migration vs baseline `7.19.0`). It measures latency and throughput metrics for standard upload, stream upload, metadata lookup, standard download, stream download, bucket file listing, file existence checks (Exists), updating metadata (Set Metadata), copying files (Copy File), and deleting files (Delete File) scenarios, while tracking heap memory footprint changes.

### Run Example:

1. **Compile the codebase:**
```bash
cd handwritten/storage
npm run compile
```

2. **Execute the benchmark comparison:**
*(Note: `--experimental-specifier-resolution=node` is recommended for ESM-compiled specifiers in node).*
```bash
node --experimental-specifier-resolution=node build/esm/internal-tooling/benchmark.js --projectid <YOUR_PROJECT_ID> --bucket <YOUR_BUCKET_NAME> --iterations 100 --baseline 7.19.0 --fileSize 10485760 --resumable
```

### CLI Parameters:

| Parameter | Description | Requirement | Default |
| --------- | ----------- | :---: | :---: |
| `--projectid` | Google Cloud Project ID | **Required** | - |
| `--bucket` | Cloud Storage Bucket Name to upload/download files | **Required** | - |
| `--iterations` | Number of iterations for each workload scenario | Optional | `100` |
| `--baseline` | Stable baseline NPM version of `@google-cloud/storage` to compare against | Optional | - |
| `--fileSize` | File size in bytes for benchmark uploads/downloads | Optional | `1024` (1KB) |
| `--resumable` | Force resumable upload for the upload scenarios | Optional | - (default behavior) |
Loading
Loading