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

[proto] Allow zero-alloc reuse of AggregatedMetric protobuf payloads #2823

Merged
merged 7 commits into from
Oct 30, 2020

Conversation

vdarulis
Copy link
Collaborator

@vdarulis vdarulis commented Oct 30, 2020

What this PR does / why we need it:

Allow zero-alloc reuse of MetricWithMetadatas protobuf payloads, by making Retention and Resolution non-nullable. Payloads with either of those sub-messages not set weren't valid anyway.

name                    old time/op    new time/op    delta
DecodeStoragePolicy-12     160ns ± 3%     117ns ± 1%   -26.60%  (p=0.000 n=9+9)

name                    old alloc/op   new alloc/op   delta
DecodeStoragePolicy-12     24.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)

name                    old allocs/op  new allocs/op  delta
DecodeStoragePolicy-12      2.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE

Copy link
Collaborator

@mway mway left a comment

Choose a reason for hiding this comment

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

lgtm

@vdarulis vdarulis merged commit 9681fcd into master Oct 30, 2020
@vdarulis vdarulis deleted the v/proto_reset branch October 30, 2020 01:51
soundvibe added a commit that referenced this pull request Oct 30, 2020
* master:
  [query] count_values label naming fixes (#2805)
  [dbnode] Read only namespaces (#2803)
  Remove old code: m3nsch (#2822)
  Update issue templates
  Update issue templates
  [proto] Allow zero-alloc reuse of AggregatedMetric protobuf payloads (#2823)
  Remove old code: aggregator/handler/trafficcontrol (#2821)
  Remove old code: aggregation/quantile/tdigest (#2820)
  AddToReset config to change Add transforms to Reset transforms (#2817)
  [metrics/rules] Add test to assert that mixed-mode keepOriginal uses keepOriginal=true (#2819)
  [dbnode] Update return unfulfilled for corrupt commit log files default (#2807)
  [dbnode] Move eviction logic up before ns loop (#2812)
  [query] Add additional parser tests (#2811)
  [config] Remove deprecated configuration fields (#2771)
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