Skip to content

ProfiledPlan: expose existence for all metrics - #1730

Merged
injectives merged 17 commits into
neo4j:6.xfrom
robsdedude:summary/expose-profile-metrics-existence
Jun 12, 2026
Merged

injectives merged 17 commits into
neo4j:6.xfrom
robsdedude:summary/expose-profile-metrics-existence

Conversation

@robsdedude

@robsdedude robsdedude commented Mar 6, 2026 •

Copy link
Copy Markdown
Member

Deprecate ResultSummary#profile() returning a ProfiledPlan in favor of ResultSummary#queryProfile returning a Profile.

The main difference between the profile interfaces is that the new one exposes whether stats (such as dbHits, time, etc.) have been recorded by returning optional types. Further, ProfiledPlan#records() corresponds to the new Profile#rows() to better align with Neo4j's embedded API, Bolt, and the raw arguments attached to the profile steps.

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-282

Depends on:

@robsdedude
robsdedude force-pushed the summary/expose-profile-metrics-existence branch from aa8ee47 to 89b196d Compare March 11, 2026 09:21
@robsdedude
robsdedude requested a review from injectives April 13, 2026 09:20
@robsdedude
robsdedude marked this pull request as ready for review April 13, 2026 09:20
@robsdedude

Copy link
Copy Markdown
Member Author

Please don't merge yet. I'd like to wait for this work to be ready for merging across all drivers first.

robsdedude added 5 commits May 6, 2026 16:16
  * deprecate summary.plan and summary.hasPlan in favor of
    summary.profilePlan returning an optional Plan
  * Expose Profile.time as Duration instead of long
@robsdedude
robsdedude requested a review from injectives June 4, 2026 13:55
@injectives
injectives merged commit 7aacaca into neo4j:6.x Jun 12, 2026
18 of 25 checks passed
@robsdedude
robsdedude deleted the summary/expose-profile-metrics-existence branch June 12, 2026 14:04
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