Skip to content

Conversation

@nithinbekal
Copy link
Contributor

@nithinbekal nithinbekal commented Sep 27, 2024

Reopening this PR from ruby/ruby here: ruby/ruby#11706


The documentation for Benchmark.realtime doesn't make it clear what unit is being used. I've updated the docs to specify that it uses seconds. The module level docs do mention that Benchmark.measure returns seconds, but it is easy to miss when looking at the method docs in isolation.

Rails has recently deprecated the Benchmark.ms monkeypatch (rails/rails#52746), which means there might be more people using this in Rails app, and clarifying the unit here will make it less confusing to switch to this.

In addition, I have also added an example for the method.

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