Add/update filtered-sum-bms benchmark

This commit is contained in:
2026-06-06 18:00:20 +00:00
parent 2944683db9
commit 260d5fa4a5
8045 changed files with 2651026 additions and 270206 deletions

View File

@@ -0,0 +1,19 @@
import { EventStreamMarshaller as UniversalEventStreamMarshaller } from "@smithy/eventstream-serde-universal";
import { iterableToReadableStream, readableStreamtoIterable } from "./utils";
export class EventStreamMarshaller {
constructor({ utf8Encoder, utf8Decoder }) {
this.universalMarshaller = new UniversalEventStreamMarshaller({
utf8Decoder,
utf8Encoder,
});
}
deserialize(body, deserializer) {
const bodyIterable = isReadableStream(body) ? readableStreamtoIterable(body) : body;
return this.universalMarshaller.deserialize(bodyIterable, deserializer);
}
serialize(input, serializer) {
const serialziedIterable = this.universalMarshaller.serialize(input, serializer);
return typeof ReadableStream === "function" ? iterableToReadableStream(serialziedIterable) : serialziedIterable;
}
}
const isReadableStream = (body) => typeof ReadableStream === "function" && body instanceof ReadableStream;