fix: v1 /map endpoint time_taken always ~0#3243
Merged
micahstairs merged 1 commit intofirecrawl:mainfrom Mar 29, 2026
Merged
Conversation
Capture Date.now() at function entry and subtract it at the end, matching the pattern used in the v2 map endpoint. Previously, both timestamps were taken on the same line, always yielding ~0. Fixes firecrawl#3165
micahstairs
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/mapendpointtime_takenwas always ~0(new Date().getTime() - Date.now()) / 1000computes two timestamps on the same line, result is always ~0Date.now()at function entry intostartTime, compute elapsed at the endmap-utils.ts)Changes
apps/api/src/controllers/v1/map.ts— 2 lines changedTest plan
time_takennow reflects actual execution timeSummary by cubic
Fixes v1
/mapendpointtime_takenalways being ~0 by capturingDate.now()at function start and computing elapsed at return. Values now reflect real execution time and match the v2 endpoint behavior.Written for commit fe12ea3. Summary will update on new commits.