Skip to content

Commit

Permalink
Fix timing stats in market-updator
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Feb 25, 2025
1 parent edf28be commit 2deabb5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion indexer/services/roundtable/src/tasks/market-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export function getPriceChange(
}

export default async function runTask(): Promise<void> {
const start: number = Date.now();

const liquidityTiers:
LiquidityTiersFromDatabase[] = await LiquidityTiersTable.findAll({}, []);
const perpetualMarkets:
Expand All @@ -56,7 +58,11 @@ export default async function runTask(): Promise<void> {
const latestPrices: PriceMap = await OraclePriceTable.getLatestPrices();
const prices24hAgo: PriceMap = await OraclePriceTable.getPricesFrom24hAgo();

const start: number = Date.now();
stats.timing(
`${config.SERVICE_NAME}.market_updater_initial_queries`,
Date.now() - start,
);

try {
const [
perpetualMarketStats,
Expand Down

0 comments on commit 2deabb5

Please sign in to comment.