Skip to content

ProfiledPlan: expose existence for all metrics#687

Draft
robsdedude wants to merge 2 commits intoneo4j:6.xfrom
robsdedude:summary/expose-profile-metrics-existence
Draft

ProfiledPlan: expose existence for all metrics#687
robsdedude wants to merge 2 commits intoneo4j:6.xfrom
robsdedude:summary/expose-profile-metrics-existence

Conversation

@robsdedude
Copy link
Member

@robsdedude robsdedude commented Mar 10, 2026

Introducing 4 new methods on ProfiledPlan:

  • HasPageCacheStats() bool: indicating whether the profile recorded page cache stats:
    • PageCacheMisses
    • PageCacheHits
    • PageCacheHitRatio
  • HasDbHits() bool: indicating whether the profile recorded DbHits.
  • HasRecords() bool: indicating whether the profile recorded Records (or rows as they're called on the embedded API).
  • HasTime() bool: indicating whether the profile recorded Time.

According to a chat with the Cypher runtime team, the absence of the value is not equivalent to it being zero. Therefore it makes sense to express this information in the API. The information is encoded in the bolt protocol through absence or existence of the respective fields. The driver logic has been changed to use this information instead of checking for fallback zero values.

Closes: DRIVERS-284

Depends on:

@robsdedude robsdedude force-pushed the summary/expose-profile-metrics-existence branch from 025adba to 8a37b5c Compare March 10, 2026 14:57
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.

1 participant