dd-trace-php icon indicating copy to clipboard operation
dd-trace-php copied to clipboard

refactor(profiling): extract SystemProfiler

Open morrisonlevi opened this issue 1 year ago • 2 comments

Description

The global profiler (e.g. PROFILER) and the Profiler::* functions that worked on it were moved into a new struct SystemProfiler.

Motivation

The profiling/src/profiling/mod.rs file was getting big and there was a logical split for functions that worked on the global PROFILER vs those which worked on a profiler object.

Reviewer checklist

  • [ ] Test coverage seems ok.
  • [ ] Appropriate labels assigned.

morrisonlevi avatar Aug 15 '24 16:08 morrisonlevi

Benchmarks

Benchmark execution time: 2024-08-15 16:25:56

Comparing candidate commit 48498a4c6f27ce21512a935560de2debccea6def in PR branch levi/system-profiler with baseline commit b8f32600dd6bc4f42d0d67fbc92161fb42eb28f7 in branch florian/remove-mutex.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 9 unstable metrics.

pr-commenter[bot] avatar Aug 15 '24 16:08 pr-commenter[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.64%. Comparing base (b8f3260) to head (48498a4).

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##             florian/remove-mutex    #2794   +/-   ##
=======================================================
  Coverage                   78.64%   78.64%           
  Complexity                   2452     2452           
=======================================================
  Files                         143      143           
  Lines                       14276    14276           
=======================================================
  Hits                        11228    11228           
  Misses                       3048     3048           
Flag Coverage Δ
tracer-extension 79.21% <ø> (ø)
tracer-php 78.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b8f3260...48498a4. Read the comment docs.

codecov-commenter avatar Aug 15 '24 16:08 codecov-commenter