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 implementations of benchmark profiling api #2220

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

ambushwork
Copy link
Contributor

What does this PR do?

  • Update BenchmarkTracer API
  • Add implementations for following interfaces:
    • BenchmarkSpanBuilder
    • BenchmarkProfiler
    • BenchmarkSpan
    • BenchmarkTracer
  • Add convenient static function to measure the span.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork ambushwork requested review from a team as code owners August 29, 2024 15:03
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.05%. Comparing base (694d558) to head (2e1399e).
Report is 2 commits behind head on feature/profiling.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feature/profiling    #2220      +/-   ##
=====================================================
+ Coverage              69.92%   70.05%   +0.12%     
=====================================================
  Files                    726      726              
  Lines                  27007    27009       +2     
  Branches                4528     4528              
=====================================================
+ Hits                   18884    18919      +35     
+ Misses                  6841     6817      -24     
+ Partials                1282     1273       -9     

see 36 files with indirect coverage changes

0xnm
0xnm previously approved these changes Aug 29, 2024
operationName: String,
block: BenchmarkSpan.() -> T
): T {
val tracer = GlobalBenchmark.get().getTracer("dd.sdk.android")
Copy link
Contributor

Choose a reason for hiding this comment

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

is it dd.sdk.android and not dd-sdk-android because of the some format requirements?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's just used as a unique identifier for the open-telemetry tracer, since we only want one tracer for benchmarking, it can be any string here.
But in case of confusion, I change it to "dd-sdk-android".

@ambushwork ambushwork merged commit ad1b37c into feature/profiling Aug 30, 2024
23 checks passed
@ambushwork ambushwork deleted the yl/profiling/interface-implementation branch August 30, 2024 07:06
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.

3 participants