File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
apps/kyberswap-interface/src/pages/CrossChainSwap/hooks Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -608,6 +608,10 @@ export const CrossChainSwapRegistryProvider = ({ children }: { children: React.R
608608 setLoading ( true )
609609 setAllLoading ( true )
610610
611+ // Track quote fetching time
612+ const quoteStartTime = performance . now ( )
613+ console . log ( '[Quote Timing] Starting to fetch quotes...' )
614+
611615 const getQuotesWithCancellation = async ( params : QuoteParams | NearQuoteParams ) => {
612616 const quotes : Quote [ ] = [ ]
613617
@@ -926,6 +930,14 @@ export const CrossChainSwapRegistryProvider = ({ children }: { children: React.R
926930 } finally {
927931 setLoading ( false )
928932 setAllLoading ( false )
933+
934+ // Log total time taken to fetch all quotes
935+ const quoteEndTime = performance . now ( )
936+ const totalTime = quoteEndTime - quoteStartTime
937+ console . log (
938+ `[Quote Timing] All quotes fetched and processed. Total time: ${ totalTime . toFixed ( 2 ) } ms (${ ( totalTime / 1000 ) . toFixed ( 2 ) } s)` ,
939+ )
940+ console . log ( `[Quote Timing] Number of quotes received: ${ quotes . length } ` )
929941 }
930942 } , [
931943 sender ,
You can’t perform that action at this time.
0 commit comments