@durable-streams/benchmarks 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -138,13 +138,14 @@ function runBenchmarks(options) {
138
138
  live: `long-poll`
139
139
  });
140
140
  await new Promise((resolve) => {
141
- const unsubscribe = res.subscribeBytes(async (chunk) => {
141
+ const unsubscribe = res.subscribeBytes((chunk) => {
142
142
  if (chunk.data.length > 0) {
143
143
  offset = chunk.offset;
144
144
  unsubscribe();
145
145
  res.cancel();
146
146
  resolve();
147
147
  }
148
+ return Promise.resolve();
148
149
  });
149
150
  });
150
151
  })();
@@ -156,12 +157,13 @@ function runBenchmarks(options) {
156
157
  live: `long-poll`
157
158
  });
158
159
  await new Promise((resolve) => {
159
- const unsubscribe = res.subscribeBytes(async (chunk) => {
160
+ const unsubscribe = res.subscribeBytes((chunk) => {
160
161
  if (chunk.data.length > 0) {
161
162
  unsubscribe();
162
163
  res.cancel();
163
164
  resolve();
164
165
  }
166
+ return Promise.resolve();
165
167
  });
166
168
  });
167
169
  })();
package/dist/index.js CHANGED
@@ -114,13 +114,14 @@ function runBenchmarks(options) {
114
114
  live: `long-poll`
115
115
  });
116
116
  await new Promise((resolve) => {
117
- const unsubscribe = res.subscribeBytes(async (chunk) => {
117
+ const unsubscribe = res.subscribeBytes((chunk) => {
118
118
  if (chunk.data.length > 0) {
119
119
  offset = chunk.offset;
120
120
  unsubscribe();
121
121
  res.cancel();
122
122
  resolve();
123
123
  }
124
+ return Promise.resolve();
124
125
  });
125
126
  });
126
127
  })();
@@ -132,12 +133,13 @@ function runBenchmarks(options) {
132
133
  live: `long-poll`
133
134
  });
134
135
  await new Promise((resolve) => {
135
- const unsubscribe = res.subscribeBytes(async (chunk) => {
136
+ const unsubscribe = res.subscribeBytes((chunk) => {
136
137
  if (chunk.data.length > 0) {
137
138
  unsubscribe();
138
139
  res.cancel();
139
140
  resolve();
140
141
  }
142
+ return Promise.resolve();
141
143
  });
142
144
  });
143
145
  })();
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@durable-streams/benchmarks",
3
3
  "description": "Performance benchmark suite for Durable Streams server implementations",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "author": "Durable Stream contributors",
6
6
  "bugs": {
7
7
  "url": "https://github.com/durable-streams/durable-streams/issues"
8
8
  },
9
9
  "dependencies": {
10
10
  "vitest": "^4.0.0",
11
- "@durable-streams/client": "0.1.2"
11
+ "@durable-streams/client": "0.1.3"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/node": "^22.15.21",
package/src/index.ts CHANGED
@@ -162,13 +162,14 @@ export function runBenchmarks(options: BenchmarkOptions): void {
162
162
  live: `long-poll`,
163
163
  })
164
164
  await new Promise<void>((resolve) => {
165
- const unsubscribe = res.subscribeBytes(async (chunk) => {
165
+ const unsubscribe = res.subscribeBytes((chunk) => {
166
166
  if (chunk.data.length > 0) {
167
167
  offset = chunk.offset
168
168
  unsubscribe()
169
169
  res.cancel()
170
170
  resolve()
171
171
  }
172
+ return Promise.resolve()
172
173
  })
173
174
  })
174
175
  })()
@@ -183,12 +184,13 @@ export function runBenchmarks(options: BenchmarkOptions): void {
183
184
  live: `long-poll`,
184
185
  })
185
186
  await new Promise<void>((resolve) => {
186
- const unsubscribe = res.subscribeBytes(async (chunk) => {
187
+ const unsubscribe = res.subscribeBytes((chunk) => {
187
188
  if (chunk.data.length > 0) {
188
189
  unsubscribe()
189
190
  res.cancel()
190
191
  resolve()
191
192
  }
193
+ return Promise.resolve()
192
194
  })
193
195
  })
194
196
  })()