Skip to content

Commit

Permalink
fixup! feat: simple CircularBuffer with fs offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 13, 2024
1 parent 8780610 commit 3612f98
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/telemetry/src/flight-recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,19 @@ export const makeSimpleCircularBuffer = async ({
*/
const writeRecord = async (record, firstWriteLength, circEnd) => {
await file.write(
record.subarray(0, firstWriteLength),
record,
// TS saying options bag not available
undefined,
undefined,
0,
firstWriteLength,
Number(circEnd) + header.byteLength,
);
if (firstWriteLength < record.byteLength) {
// Write to the beginning of the arena.
await file.write(
record.subarray(firstWriteLength, record.byteLength),
undefined,
undefined,
header.byteLength,
record,
firstWriteLength,
record.byteLength - firstWriteLength,
I_ARENA_START,
);
}

Expand Down

0 comments on commit 3612f98

Please sign in to comment.