Skip to content

Commit

Permalink
Track metrics of post-filter pools from subgraph (Uniswap#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeki authored May 13, 2024
1 parent e339c03 commit b0c6ce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/providers/v2/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
});

metric.putMetric(`V2SubgraphProvider.chain_${this.chainId}.getPools.filter.latency`, Date.now() - beforeFilter);
metric.putMetric(`V2SubgraphProvider.chain_${this.chainId}.getPools.filter.length`, poolsSanitized.length);
metric.putMetric(`V2SubgraphProvider.chain_${this.chainId}.getPools`, 1);
metric.putMetric(`V2SubgraphProvider.chain_${this.chainId}.getPools.latency`, Date.now() - beforeAll);

Expand Down
2 changes: 1 addition & 1 deletion src/providers/v3/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export class V3SubgraphProvider implements IV3SubgraphProvider {
});

metric.putMetric(`V3SubgraphProvider.chain_${this.chainId}.getPools.filter.latency`, Date.now() - beforeFilter);

metric.putMetric(`V3SubgraphProvider.chain_${this.chainId}.getPools.filter.length`, poolsSanitized.length);
metric.putMetric(`V3SubgraphProvider.chain_${this.chainId}.getPools`, 1);
metric.putMetric(`V3SubgraphProvider.chain_${this.chainId}.getPools.latency`, Date.now() - beforeAll);

Expand Down

0 comments on commit b0c6ce0

Please sign in to comment.