[Profiler] Return string view for symbol resolution#3127
Merged
gleocadie merged 5 commits intoSep 1, 2022
Conversation
gleocadie
force-pushed
the
gleocadie/return-string_view-for-symbol-resolution-act-2
branch
from
August 25, 2022 17:35
ace9582 to
d3a23a5
Compare
chrisnas
reviewed
Aug 26, 2022
| auto exporter = LibddprofExporter(&mockConfiguration, &applicationStore, runtimeInfo, &enabledProfilers); | ||
|
|
||
| // Add samples to only one application | ||
| auto callstack1 = std::initializer_list<std::pair<std::string, std::string>>({{"module", "frame1"}, {"module", "frame2"}, {"module", "frame3"}}); |
Contributor
There was a problem hiding this comment.
Good idea to have variables for the frames
Maybe having them as a class field could be the next step: it would avoid repeating them in tests
This comment has been minimized.
This comment has been minimized.
gleocadie
force-pushed
the
gleocadie/return-string_view-for-symbol-resolution-act-2
branch
from
August 26, 2022 09:58
5f59d20 to
443db37
Compare
Member
Benchmarks Report 🐌Benchmarks for #3127 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
gleocadie
force-pushed
the
gleocadie/return-string_view-for-symbol-resolution-act-2
branch
14 times, most recently
from
August 31, 2022 20:54
2971862 to
80030bf
Compare
Co-authored-by: chrisnas <[email protected]>
gleocadie
force-pushed
the
gleocadie/return-string_view-for-symbol-resolution-act-2
branch
from
August 31, 2022 21:01
80030bf to
0a0a00b
Compare
gleocadie
deleted the
gleocadie/return-string_view-for-symbol-resolution-act-2
branch
September 1, 2022 12:55
kevingosse
pushed a commit
that referenced
this pull request
Sep 1, 2022
* Run unit tests with ASAN * Run unit tests with UBSAN Co-authored-by: chrisnas <[email protected]>
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.
Summary of changes
Reason for change
When resolving symbols, we return
std::string, and those string are copied multiple times, until added to the profile..By using
std::string_viewwherever we can we avoid string copies and memory/cpu overhead.Implementation details
Use
std::string_viewwhen resolving symbols.Test coverage
Ensure that current test are working correctly.
Other details