Skip to content

Commit

Permalink
Also track push gap
Browse files Browse the repository at this point in the history
  • Loading branch information
aboodman committed Dec 23, 2021
1 parent c0b30b0 commit 16222ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/d/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { NullableVersion, nullableVersionSchema } from "backend/types/version";
import { sleep } from "util/test-utils";
import { GapTracker } from "util/gap-tracker";

const pushTracker = new GapTracker("push");

export default function Home() {
const [rep, setRep] = useState<Replicache<M> | null>(null);

Expand Down Expand Up @@ -48,6 +50,8 @@ export default function Home() {
m.timestamp = performance.now();
}

pushTracker.push(performance.now());

sleep(200).then(() => {
ws.send(JSON.stringify(msg));
});
Expand Down

0 comments on commit 16222ab

Please sign in to comment.