-
Couldn't load subscription status.
- Fork 62
Expose runtime settings & stats for metrics scraping and diagnostics #335
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
Conversation
Metrics for allocations and open files: * `Vips.tracked_mem` - bytes currently allocated * `Vips.tracked_mem_highwater` - max bytes allocated * `Vips.tracked_allocs` - current allocation count * `Vips.tracked_files` - current open file count Expose global settings for inspection: * `Vips.vector?` - whether SIMD vector support is enabled * `Vips.cache_max` - max operations to cache * `Vips.cache_max_mem` - max bytes to cache * `Vips.cache_max_files` - max open files to cache
ea88e72 to
a30fc5b
Compare
I was puzzled that setting concurrency to 0 didn't reset to default. I misread how that works, though. I think exposing the default concurrency and resetting to it is helpful, though, so split that into #336.
Thank you for doing this work, @jeremy. I'm fighting pyvips right now, but I should be on ruby-vips in another day or so and I'll review and merge these useful PRs then.
For once I finished off pyvips more easily than I expected heh.
This looks great. thanks again. I added a note to the changelog crediting you, I hope that's OK.
Nice @jcupitt - thank you!
Uh oh!
There was an error while loading. Please reload this page.
I frequently find myself attaching these via FFI for closer inspection, so I figured they may be worthwhile to have available by default.
Metrics for allocations and open files:
Vips.tracked_mem- bytes currently allocatedVips.tracked_mem_highwater- max bytes allocatedVips.tracked_allocs- current allocation countVips.tracked_files- current open file countExpose global settings for inspection:
Vips.vector?- whether SIMD vector support is enabledVips.cache_max- max operations to cacheVips.cache_max_mem- max bytes to cacheVips.cache_max_files- max open files to cacheUpdated the corresponding Ruby setter methods to return the new value rather than
nil.