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

Incorrect documentation for Environment.stat() #254

Closed
NightTsarina opened this issue Sep 22, 2020 · 1 comment · Fixed by #255
Closed

Incorrect documentation for Environment.stat() #254

NightTsarina opened this issue Sep 22, 2020 · 1 comment · Fixed by #255

Comments

@NightTsarina
Copy link

Hi,

The documentation says:

Space usage can be monitored using Environment.stat():

>>> pprint(env.stat())
{'branch_pages': 1040L,

'depth': 4L,
'entries': 3761848L,
'leaf_pages': 73658L,
'overflow_pages': 0L,
'psize': 4096L}

This database contains 3,761,848 records and no values were spilled (overflow_pages).

But this is not correct when sub-dbs are in use, and only stats for the unnamed database are given. To see the total number of entries, you need to iterate over all databases and aggregate the statistics (and for this reason I opened #253 a few minutes ago)

@jnwatson
Copy link
Owner

Thank you for your observation. I have corrected the documentation.

jnwatson added a commit that referenced this issue Sep 29, 2020
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 a pull request may close this issue.

2 participants