switch to using json sanitizer for admin counters, gauges, and text-readouts#20745
Merged
jmarantz merged 7 commits intoenvoyproxy:mainfrom Apr 12, 2022
Merged
Conversation
…eadouts Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Contributor
Author
|
/retest |
|
Retrying Azure Pipelines: |
wbpcode
reviewed
Apr 11, 2022
Member
wbpcode
left a comment
There was a problem hiding this comment.
LGTM overall. Only one nit comment.
| std::unique_ptr<ProtobufWkt::ListValue> histogram_array_; | ||
| bool found_used_histogram_{false}; | ||
| bool first_{true}; | ||
| absl::string_view delim_{""}; |
Contributor
Author
There was a problem hiding this comment.
nope; need to init to a valid pointer as this is used in Buffer::addFragments which passes .data() to memcpy, and having nullptr for the src arg fails ASAN even if size==0 :)
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Contributor
Author
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Member
|
cc @envoyproxy/senior-maintainers for merge or second pass for this PR that contains some core code updates. |
Member
|
/assign-from @envoyproxy/senior-maintainers |
|
@envoyproxy/senior-maintainers assignee is @zuercher |
zuercher
approved these changes
Apr 12, 2022
Member
|
@jmarantz I'll leave the merge to you |
vehre-x41
pushed a commit
to vehre-x41/envoy
that referenced
this pull request
Apr 19, 2022
…eadouts (envoyproxy#20745) Commit Message: Uses the new Json::sanitizer from envoyproxy#20637 to generate counters, gauges, and text-readouts in response to admin endpoint `/stats?format=json`, resulting in a 5.6x speedup for AllCountersJson, and making JSON output only around 10% slower than text output. Additional Description: Before: ``` ------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------ BM_AllCountersText 454 ms 453 ms 2 BM_UsedCountersText 35.8 ms 35.8 ms 20 BM_FilteredCountersText 1806 ms 1805 ms 1 BM_AllCountersJson 2824 ms 2823 ms 1 BM_UsedCountersJson 61.8 ms 61.8 ms 11 BM_FilteredCountersJson 1798 ms 1798 ms 1 ``` after ``` ------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------ BM_AllCountersText 458 ms 458 ms 2 BM_UsedCountersText 36.1 ms 36.1 ms 19 BM_FilteredCountersText 1790 ms 1790 ms 1 BM_AllCountersJson 496 ms 496 ms 2 BM_UsedCountersJson 36.4 ms 36.4 ms 19 BM_FilteredCountersJson 1789 ms 1789 ms 1 ``` Risk Level: low -- Json::sanitizer is new, but based on nlohmann, and is differentially fuzzed vs protobuf serialization Testing: //test/server/admin/... Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Joshua Marantz <jmarantz@google.com> ogle.com> Signed-off-by: Andre Vehreschild <vehre@x41-dsec.de>
ravenblackx
pushed a commit
to ravenblackx/envoy
that referenced
this pull request
Jun 8, 2022
…eadouts (envoyproxy#20745) Commit Message: Uses the new Json::sanitizer from envoyproxy#20637 to generate counters, gauges, and text-readouts in response to admin endpoint `/stats?format=json`, resulting in a 5.6x speedup for AllCountersJson, and making JSON output only around 10% slower than text output. Additional Description: Before: ``` ------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------ BM_AllCountersText 454 ms 453 ms 2 BM_UsedCountersText 35.8 ms 35.8 ms 20 BM_FilteredCountersText 1806 ms 1805 ms 1 BM_AllCountersJson 2824 ms 2823 ms 1 BM_UsedCountersJson 61.8 ms 61.8 ms 11 BM_FilteredCountersJson 1798 ms 1798 ms 1 ``` after ``` ------------------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------------------ BM_AllCountersText 458 ms 458 ms 2 BM_UsedCountersText 36.1 ms 36.1 ms 19 BM_FilteredCountersText 1790 ms 1790 ms 1 BM_AllCountersJson 496 ms 496 ms 2 BM_UsedCountersJson 36.4 ms 36.4 ms 19 BM_FilteredCountersJson 1789 ms 1789 ms 1 ``` Risk Level: low -- Json::sanitizer is new, but based on nlohmann, and is differentially fuzzed vs protobuf serialization Testing: //test/server/admin/... Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Joshua Marantz <jmarantz@google.com> ogle.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: Uses the new Json::sanitizer from #20637 to generate counters, gauges, and text-readouts in response to admin endpoint
/stats?format=json, resulting in a 5.6x speedup for AllCountersJson, and making JSON output only around 10% slower than text output.Additional Description:
Before:
after
Risk Level: low -- Json::sanitizer is new, but based on nlohmann, and is differentially fuzzed vs protobuf serialization
Testing: //test/server/admin/...
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a