Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
jcupitt merged 1 commit into libvips:master from jeremy:runtime-inspection
May 24, 2022

Conversation

@jeremy
Copy link
Contributor

@jeremy jeremy commented May 19, 2022
edited
Loading

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

Updated the corresponding Ruby setter methods to return the new value rather than nil.

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
@jeremy jeremy force-pushed the runtime-inspection branch from ea88e72 to a30fc5b Compare May 24, 2022 07:01
Copy link
Contributor Author

jeremy commented May 24, 2022
edited
Loading

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.

Copy link
Member

jcupitt commented May 24, 2022

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.

jeremy reacted with heart emoji

@jcupitt jcupitt merged commit c07ab5d into libvips:master May 24, 2022
jcupitt added a commit that referenced this pull request May 24, 2022
Copy link
Member

jcupitt commented May 24, 2022

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.

jeremy reacted with thumbs up emoji

Copy link
Contributor Author

jeremy commented May 24, 2022

Nice @jcupitt - thank you!

@jeremy jeremy deleted the runtime-inspection branch May 24, 2022 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /