Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): batch checkpoint object flushes on macOS and Windows #21291

Mergedjosephv123(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/21291/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 103 additions and 63 deletions (loading 1).

x
0 of 4 viewed, 4 left
73 additions and 59 deletionsapps/server/src/vcs/GitVcsDriver.test.tsModified
View file
@@ -1367,69 +1367,83 @@
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
-it.effect("GitVcsDriver flushes checkpoint objects and refs to disk before publishing them", () => {
- const observedArgs: ReadonlyArray<string>[] = [];
-​
- return Effect.gen(function* () {
- const driver = yield* GitVcsDriver.makeVcsDriverShape();
+it.effect.each([
+ { platform: "linux", fsyncMethods: ["fsync"] },
+ { platform: "darwin", fsyncMethods: ["fsync", "batch"] },
+ { platform: "win32", fsyncMethods: ["fsync", "batch"] },
+] as const)(
+ "GitVcsDriver flushes checkpoint objects and refs to disk before publishing them on $platform",
+ ({ platform, fsyncMethods }) => {
+ const observedArgs: ReadonlyArray<string>[] = [];
+​
+ return Effect.gen(function* () {
+ const driver = yield* GitVcsDriver.makeVcsDriverShape();
- yield* driver.checkpoints.captureCheckpoint({
- cwd: "/repo",
- checkpointRef: CheckpointRef.make("refs/t3/checkpoints/thread/turn/1"),
- });
+ yield* driver.checkpoints.captureCheckpoint({
+ cwd: "/repo",
+ checkpointRef: CheckpointRef.make("refs/t3/checkpoints/thread/turn/1"),
+ });