Skip to content

chore(api): update benchmarks#2107

Open
xuan-cao-swi wants to merge 1 commit intoopen-telemetry:mainfrom
xuan-cao-swi:fix_api_benchmark
Open

chore(api): update benchmarks#2107
xuan-cao-swi wants to merge 1 commit intoopen-telemetry:mainfrom
xuan-cao-swi:fix_api_benchmark

Conversation

@xuan-cao-swi
Copy link
Copy Markdown
Contributor

Description

benchmarks was broken: added the opentelemetry-sdk as test dependency.
I don't see the need to keep using benchmark-ipsa for the additional memory_profiler.report (correct me if I am wrong)

spec.add_dependency 'logger'

spec.add_development_dependency 'benchmark-ipsa', '~> 0.2.0'
spec.add_development_dependency 'benchmark-ips', '~> 2.14.0'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because we are switching tools why don't we move this to the gemfile?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am ok with either put here or in gemfile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would rather gem so that we can move towards eliminating the disabling of the corresponding rubocop cop & the updating process is natively handled by renovate.

end

Benchmark.ipsa do |x|
Benchmark.ips do |x|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you sure that this isn't changing the measurements/data being captured/recorded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ipsa only have additional allocations stats from MemoryProfiler.report()
e.g.

Allocations -------------------------------------
               name=       0/0  alloc/ret        0/0  strings/ret
       set_attribute       0/0  alloc/ret        0/0  strings/ret
           add_event       2/2  alloc/ret        0/0  strings/ret

I'm not sure this information is still valuable or relevant, as it doesn't provide meaningful comparisons like ips does (e.g., xxx is 1.45x faster than xxx). ipsa is also quite old and conflicts with using the latest version of ips. If allocation data is truly needed, we could simply inline/copy the relevant MemoryProfiler.report logic rather than depending on an unmaintained gem.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am All for switching from an unmaintained gem, my question steemed from reading the pr description.

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