Skip to content

Store trace timestamps as microtime floats instead of integers - #10

Merged
robertvansteen merged 1 commit into
mainfrom
claude/update-timestamps-microtime-NFQGo
Feb 20, 2026
Merged

robertvansteen merged 1 commit into
mainfrom
claude/update-timestamps-microtime-NFQGo

Conversation

@robertvansteen

Copy link
Copy Markdown
Contributor

Summary

Changed the trace timestamp metadata to store the full microtime float value instead of casting it to an integer, providing microsecond precision instead of second precision.

Key Changes

  • Modified TracingResolver::resolve() to store the raw $start microtime value instead of casting it to (int) $start
  • Updated the corresponding test test_timestamp_is_a_unix_timestamp() to:
    • Rename to test_timestamp_is_a_microtime_float() to reflect the new behavior
    • Remove integer casting from $before and $after comparison values
    • Assert the timestamp is a float instead of an integer

Implementation Details

This change improves timing precision in trace metadata by preserving microsecond-level accuracy from microtime(true). The timestamp can now be used for more precise performance analysis and debugging without losing sub-second resolution.

https://claude.ai/code/session_01CNzHGDAxDHo3s1sMhrLALx

Removes the (int) cast on the microtime(true) value so timestamps
retain microsecond precision. Updates the corresponding test to
assert a float.

https://claude.ai/code/session_01CNzHGDAxDHo3s1sMhrLALx
@robertvansteen
robertvansteen merged commit da4377d into main Feb 20, 2026
1 check passed
@robertvansteen
robertvansteen deleted the claude/update-timestamps-microtime-NFQGo branch February 20, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants