Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagecache hits and misses to plan output #812

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

oskarhane
Copy link
Member

@oskarhane oskarhane commented Aug 20, 2018

Show page cache stats right next to hits / estimated row stats.
I also added a E2E test for it.

oskarhane-mbpt 2018-08-20 at 10 41 11

(Sorry for the formatting changes, I guess prettier got updated.)

@@ -179,6 +179,19 @@ neo.queryPlan = function(element) {
details.push({ className: 'padding' })
}

if (operator.PageCacheHits || operator.PageCacheMisses) {
Copy link
Contributor

@pe4cey pe4cey Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't PageCacheHits and PageCacheMisses (if present) always come together in the result?
If one is present but the other isn't; how does formatNumber bellow handle undefined?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they come together.
Those are also zero checks since the result sends PageCacheHits: 0, PageCacheMisses: 0 and in that case we don't want to show them at all.
But if one of them aren't 0, we want to show them.
@pe4cey.

details.push({
className: 'pagecache-hits',
key: 'pagecache hits',
value: formatNumber(operator.PageCacheHits)
Copy link
Contributor

@pe4cey pe4cey Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

@pe4cey pe4cey merged commit fd39c28 into neo4j:master Aug 21, 2018
@oskarhane oskarhane deleted the pc-hits-in-profile branch October 23, 2018 15:04
myzero1 pushed a commit to myzero1/neo4j-browser that referenced this pull request May 17, 2019
Add pagecache hits and misses to plan output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants