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

Add a value type version of Batch<T> #1327

Closed
wants to merge 5 commits into from
Closed

Conversation

reyang
Copy link
Member

@reyang reyang commented Oct 7, 2020

Related to #1315 and #1325.

To make it easier, please review the 2nd commit which has the diff (the 1st commit is a direct copy of the existing Batch).

Changes

  • Introduced a BatchStruct for value types, which helps to avoid heap allocation.
  • Added stress test for both the reference type and value type for comparison.
  • On my machine I have observed 40% perf increase using the value type (BatchStruct).

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@reyang reyang requested a review from a team October 7, 2020 02:33
@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #1327 into master will decrease coverage by 0.46%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1327      +/-   ##
==========================================
- Coverage   76.51%   76.04%   -0.47%     
==========================================
  Files         224      225       +1     
  Lines        6471     6507      +36     
==========================================
- Hits         4951     4948       -3     
- Misses       1520     1559      +39     
Impacted Files Coverage Δ
src/OpenTelemetry/BatchStruct.cs 0.00% <0.00%> (ø)
...us/Implementation/PrometheusExporterEventSource.cs 63.63% <0.00%> (-9.10%) ⬇️
...ZPages/Implementation/ZPagesExporterEventSource.cs 56.25% <0.00%> (-6.25%) ⬇️
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 97.14% <0.00%> (-2.86%) ⬇️

@reyang reyang mentioned this pull request Oct 7, 2020
3 tasks
@reyang
Copy link
Member Author

reyang commented Oct 7, 2020

Superseded by #1328.

@reyang reyang closed this Oct 7, 2020
@reyang reyang deleted the reyang/log-exporter branch October 7, 2020 20:40
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.

1 participant