Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): answer cheap git metadata from repository files instead of spawning git #12602

ClosedSkiTee3000(GitHub profile, opens in a new tab)wants to merge 15 commits intomain fromrefs/pull/12602/headopened View on GitHub

Showing 7 changed files with 20 additions and 18 deletions (loading 5).

x
0 of 7 viewed, 7 left
1 addition and 1 deletionapps/server/src/observability/Metrics.tsModified
View file
@@ -110,7 +110,7 @@
) => Readonly<Record<string, unknown>>;
​
-const recordMetrics = (
+export const recordMetrics = (
options: WithMetricsOptions,
startedAt: bigint,
exit: Exit.Exit<unknown, unknown>,
19 additions and 17 deletionsapps/server/src/project/RepositoryIdentityResolver.tsModified
View file
@@ -9,8 +9,10 @@
import * as Effect from "effect/Effect";
import * as Exit from "effect/Exit";
import * as Layer from "effect/Layer";
+import * as Option from "effect/Option";
​
import * as ProcessRunner from "../processRunner.ts";
+import * as GitMetadataFastPath from "../vcs/GitMetadataFastPath.ts";
​
const DEFAULT_REPOSITORY_IDENTITY_CACHE_CAPACITY = 512;
// Background sweeps resolve every project each minute. A long TTL keeps them
@@ -115,19 +117,26 @@
​
-const resolveRepositoryIdentityCacheKey = Effect.fn("RepositoryIdentityResolver.resolveCacheKey")(