Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyscott18 committed Nov 14, 2023
1 parent 2172baf commit 4d98b99
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benchmarks/src/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ const waitForSyncComplete = async () => {
let timeout = undefined;
const interval = setInterval(async () => {
const latestSyncedBlockNumber = await fetchSubgraphLatestBlockNumber();
console.log(
`Latest synced block number: ${latestSyncedBlockNumber}/${END_BLOCK}`,
const block = Number(
(await fetchSubgraphMetrics()).find(
(m) => m?.name === "deployment_head",
)?.metrics?.[0]?.value ?? 0,
);

for (const m of await fetchSubgraphMetrics()) {
if (m["name"] === "deployment_head") console.log(JSON.stringify(m));
}
console.log(`Latest synced block number: ${block}/${END_BLOCK}`);

if (latestSyncedBlockNumber >= END_BLOCK) {
duration = endClock();
Expand Down

0 comments on commit 4d98b99

Please sign in to comment.