Skip to content

feat(profiling): add extensible profile type API for prototyping#2202

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
r1viollet/custom-profile-types
Jul 15, 2026
Merged

feat(profiling): add extensible profile type API for prototyping#2202
gh-worker-dd-mergequeue-cf854d[bot] merged 6 commits into
mainfrom
r1viollet/custom-profile-types

Conversation

@r1viollet

@r1viollet r1viollet commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds five configurable custom profile type slots for profile types that are not yet stable enough to add as dedicated SampleType variants.

  • adds SampleType::Custom1 through SampleType::Custom5
  • keeps the normal profile constructors as the primary API
  • adds setters to configure a custom slot with its concrete (type, unit) pair before serialization
    • Rust: Profile::set_custom_sample_type
    • C: ddog_prof_Profile_set_custom_sample_type
    • CXX: Profile::set_custom_sample_type
  • rejects serialization if a used custom slot is not configured
  • updates the replayer to map unknown pprof (type, unit) pairs onto Custom1..Custom5
  • removes the previous fixed Experimental* variants
  • adds a C example for memory-breakdown / bytes

Motivation

#1450 moved the C API toward SampleType, which is still the right API for stable, agreed-upon profile types.

This PR adds @danielsn's slot-based prototyping path: profilers can use a bounded set of custom slots, configure their names/units at profile construction time, and avoid waiting for a libdatadog release while evaluating a new type such as memory-breakdown. Once the type is stable, it should be promoted to a dedicated SampleType variant and callers should migrate back to the fully typed API.

Additional Notes

The old ExperimentalCount, ExperimentalNanoseconds, and ExperimentalBytes variants were fixed to names like experimental-bytes, so they could not express a meaningful type name and only provided three unit-specific slots. They are replaced by Custom1..Custom5.

For memory-breakdown, the sample type is configured as ("memory-breakdown", "bytes"). Anonymous/file/JIT/etc. breakdowns are represented by separate stacks or labels within that type, not by separate sample types.

The period remains profile-level sampling metadata, not per-sample-type metadata. The custom example passes no period because memory-breakdown is a point-in-time byte measurement with no meaningful sampling cadence.

BREAKING CHANGE: ExperimentalCount, ExperimentalNanoseconds, and ExperimentalBytes are removed from SampleType. Use Custom1..Custom5 and configure the selected slot with set_custom_sample_type.

How to test the change?

Local macOS:

cargo +nightly-2026-02-08 fmt --all -- --check
cargo check -p libdd-profiling --features cxx
cargo test -p libdd-profiling -p libdd-profiling-ffi -p datadog-profiling-replayer --no-fail-fast
cargo +stable clippy --workspace --all-targets --all-features -- -D warnings

Linux workspace:

cargo check -p libdd-profiling --features cxx
cargo test -p libdd-profiling -p libdd-profiling-ffi -p datadog-profiling-replayer --no-fail-fast
cargo run --bin release --features profiling --release -- --out release
cd examples/ffi
cmake -S . -B build -DDatadog_ROOT=$HOME/go/src/github.com/DataDog/libdatadog-2/release
cmake --build build --target custom_profile_types -j2
LD_LIBRARY_PATH=$HOME/go/src/github.com/DataDog/libdatadog-2/release/lib ./build/custom_profile_types
cd ../..
cargo ffi-test --skip-build --filter custom_profile_types

@r1viollet r1viollet requested review from a team as code owners July 7, 2026 08:34
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 7, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 76.36%
Overall Coverage: 74.46% (+0.04%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0c7d261 | Docs | Datadog PR Page | Give us feedback!

/// [`ddog_prof_Profile_new_custom`].
#[repr(C)]
#[derive(Copy, Clone)]
pub struct CustomPeriod<'a> {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure we need this, I'll have to check what periods mean in OTel

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So after checking

  • pprof only has one period, so this does not really need to exist
  • otel has one period per sample type (as this is split per sample type), so if you want to profile every X system call, you might want to specify it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7888ea198

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread libdd-profiling/src/cxx.rs Outdated
@dd-octo-sts

dd-octo-sts Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.88 MB 7.88 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 86.15 MB 86.30 MB +.18% (+161.16 KB) 🔍
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.62 MB 10.62 MB +.03% (+3.59 KB) 🔍
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 97.40 MB 97.52 MB +.12% (+129.13 KB) 🔍
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 25.54 MB 25.57 MB +.11% (+29.50 KB) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.77 KB +.37% (+340 B) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 185.33 MB 185.50 MB +.09% (+176.00 KB) 🔍
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 957.25 MB 957.66 MB +.04% (+423.28 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.35 MB 8.36 MB +.11% (+10.00 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 88.44 KB 88.77 KB +.37% (+340 B) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 24.72 MB 24.75 MB +.12% (+32.00 KB) 🔍
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 49.21 MB 49.27 MB +.11% (+58.33 KB) 🔍
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 22.19 MB 22.22 MB +.12% (+28.00 KB) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 89.82 KB 90.16 KB +.37% (+344 B) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 189.78 MB 189.96 MB +.09% (+184.00 KB) 🔍
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 945.93 MB 946.30 MB +.03% (+379.75 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.46 MB 6.47 MB +.10% (+7.00 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 89.82 KB 90.16 KB +.37% (+344 B) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 26.54 MB 26.58 MB +.14% (+40.00 KB) 🔍
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 46.82 MB 46.88 MB +.11% (+55.49 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 76.96 MB 77.07 MB +.13% (+108.87 KB) 🔍
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.81 MB 8.83 MB +.17% (+16.00 KB) 🔍
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 92.37 MB 92.48 MB +.11% (+110.73 KB) 🔍
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.72 MB 10.74 MB +.19% (+21.78 KB) 🔍

@r1viollet r1viollet force-pushed the r1viollet/custom-profile-types branch from f7888ea to 415afc9 Compare July 7, 2026 08:52
@r1viollet r1viollet marked this pull request as draft July 7, 2026 08:58
WallLegacy,

// Experimental sample types for testing and development.
ExperimentalCount,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was going to remove these, though this is an API breaking change, so I can move this to a separate PR.

Allow callers to create profiles with arbitrary (type, unit) string pairs
without adding a variant to SampleType or cutting a libdatadog release.

- Internal Profile storage changed from Box<[SampleType]> to
  Box<[ValueType<'static>]>, making the enum a pure conversion layer
- Profile::try_new_with_value_types / try_new_with_value_types_and_dictionary
  added as the Rust raw-string path
- ddog_prof_Profile_new_custom + CustomValueType / CustomPeriod structs
  added to the C FFI
- Profile::create_with_value_types added to the CXX bridge
- Replayer updated to round-trip unknown types via Box::leak (short-lived tool)
- ExperimentalCount / ExperimentalNanoseconds / ExperimentalBytes removed:
  they mapped to fixed strings and could not distinguish multiple custom
  measurements of the same unit
- examples/ffi/custom_profile_types.c demonstrates the new C API
- Four new unit tests cover round-trip serialization, reset survival,
  value-count validation, and parity with the SampleType path
@r1viollet r1viollet force-pushed the r1viollet/custom-profile-types branch from 415afc9 to 3b474e1 Compare July 7, 2026 09:31
@r1viollet r1viollet marked this pull request as ready for review July 7, 2026 13:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84771716f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread libdd-profiling/src/cxx.rs Outdated
Comment on lines +584 to +585
let type_: &'static str = Box::leak(type_.to_string().into_boxed_str());
let unit: &'static str = Box::leak(unit.to_string().into_boxed_str());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retain custom type strings without leaking them

When CXX callers repeatedly create and drop custom-value profiles, such as recreating a profile from configuration, Box::leak makes every type/unit and period string process-lifetime even after the Profile is dropped. Because the internal profile only keeps &'static str, these allocations are never reclaimed, so memory grows with each profile creation rather than merely copying the strings for construction; keep the owned strings with the profile/internal config or otherwise free them on drop.

Useful? React with 👍 / 👎.

return api::ValueType::from(st);
}
// Slow path: custom type not yet in the enum – own the strings.
let ty: &'static str = Box::leak(type_str.to_string().into_boxed_str());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is OK unless we continuously create new profile types, which should not happen ?

@r1viollet

Copy link
Copy Markdown
Contributor Author

So Daniel had an idea to avoid the current change in constructor, we can have custom types that we can specify

@danielsn danielsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As we discussed offline, a cleaner solution could be to add Custom0 .. CustomN enums and an API for associating them with a name and value type

Comment thread libdd-profiling/src/api/sample_type.rs Outdated
/// Deprecated: use `Profile::try_new_with_value_types` with a descriptive raw `(type, unit)`
/// pair instead. This fixed name cannot distinguish multiple custom time measurements.
ExperimentalNanoseconds,
/// Deprecated: use `Profile::try_new_with_value_types` with a descriptive raw `(type, unit)`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is anyone currently using this or can we just remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to remove these, and then I had semver check issues 🤔
I don't think they are used, I'd favour removing them

@danielsn danielsn self-requested a review July 7, 2026 15:52
@r1viollet r1viollet marked this pull request as draft July 7, 2026 15:56
Use Daniel's slot-based design for custom profile types: callers create
profiles with SampleType::Custom1 through Custom5, then configure each slot
with its concrete (type, unit) pair before serialization.

This keeps the normal profile constructors as the primary API while still
allowing profiler teams to prototype new profile types before promoting them
to stable SampleType variants.

BREAKING CHANGE: remove the ExperimentalCount, ExperimentalNanoseconds, and
ExperimentalBytes SampleType variants in favor of Custom1 through Custom5.
@r1viollet r1viollet marked this pull request as ready for review July 9, 2026 16:00
@pr-commenter

pr-commenter Bot commented Jul 14, 2026

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-07-14 19:19:03

Comparing candidate commit 0c7d261 in PR branch r1viollet/custom-profile-types with baseline commit a7ec21d in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 113.062µs 113.956µs ± 0.383µs 113.933µs ± 0.177µs 114.126µs 114.354µs 115.162µs 117.446µs 3.08% 3.978 33.957 0.33% 0.027µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [113.903µs; 114.009µs] or [-0.047%; +0.047%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.069ms 4.074ms ± 0.004ms 4.074ms ± 0.001ms 4.075ms 4.082ms 4.086ms 4.104ms 0.75% 3.956 26.621 0.09% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.074ms; 4.075ms] or [-0.012%; +0.012%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiles_dictionary/profile_string_inserts/threads/1 execution_time 318.876µs 322.060µs ± 1.993µs 323.087µs ± 0.964µs 323.534µs 324.070µs 324.203µs 324.236µs 0.36% -0.444 -1.498 0.59% 0.630µs 1 10
profiles_dictionary/profile_string_inserts/threads/1 throughput 3158195.221op/s 3179640.622op/s ± 19726.344op/s 3169425.712op/s ± 9430.286op/s 3198294.689op/s 3206753.596op/s 3210370.866op/s 3211275.183op/s 1.32% 0.449 -1.492 0.59% 6238.018op/s 1 10
profiles_dictionary/profile_string_inserts/threads/16 execution_time 1.935ms 1.941ms ± 0.008ms 1.938ms ± 0.002ms 1.940ms 1.955ms 1.962ms 1.963ms 1.31% 2.083 3.119 0.42% 0.003ms 1 10
profiles_dictionary/profile_string_inserts/threads/16 throughput 8345386.703op/s 8442148.749op/s ± 36639.070op/s 8454856.503op/s ± 8829.550op/s 8462127.306op/s 8465627.460op/s 8466593.117op/s 8466834.532op/s 0.14% -2.074 3.087 0.41% 11586.291op/s 1 10
profiles_dictionary/profile_string_inserts/threads/2 execution_time 561.957µs 567.413µs ± 3.598µs 566.651µs ± 1.917µs 570.252µs 572.622µs 573.201µs 573.346µs 1.18% 0.328 -0.956 0.60% 1.138µs 1 10
profiles_dictionary/profile_string_inserts/threads/2 throughput 3572013.216op/s 3609495.350op/s ± 22845.971op/s 3614215.019op/s ± 12270.304op/s 3625262.241op/s 3636355.144op/s 3642797.042op/s 3644407.516op/s 0.84% -0.311 -0.955 0.60% 7224.530op/s 1 10
profiles_dictionary/profile_string_inserts/threads/4 execution_time 749.167µs 751.502µs ± 2.101µs 751.186µs ± 1.220µs 752.279µs 754.802µs 755.906µs 756.182µs 0.67% 1.031 0.413 0.27% 0.664µs 1 10
profiles_dictionary/profile_string_inserts/threads/4 throughput 5416682.116op/s 5450458.904op/s ± 15194.249op/s 5452715.750op/s ± 8855.223op/s 5461870.704op/s 5465477.378op/s 5467018.290op/s 5467403.518op/s 0.27% -1.020 0.389 0.26% 4804.843op/s 1 10
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiles_dictionary/profile_string_inserts/threads/1 execution_time [320.825µs; 323.295µs] or [-0.384%; +0.384%] None None None
profiles_dictionary/profile_string_inserts/threads/1 throughput [3167414.332op/s; 3191866.913op/s] or [-0.385%; +0.385%] None None None
profiles_dictionary/profile_string_inserts/threads/16 execution_time [1.936ms; 1.946ms] or [-0.271%; +0.271%] None None None
profiles_dictionary/profile_string_inserts/threads/16 throughput [8419440.035op/s; 8464857.463op/s] or [-0.269%; +0.269%] None None None
profiles_dictionary/profile_string_inserts/threads/2 execution_time [565.183µs; 569.643µs] or [-0.393%; +0.393%] None None None
profiles_dictionary/profile_string_inserts/threads/2 throughput [3595335.530op/s; 3623655.169op/s] or [-0.392%; +0.392%] None None None
profiles_dictionary/profile_string_inserts/threads/4 execution_time [750.200µs; 752.804µs] or [-0.173%; +0.173%] None None None
profiles_dictionary/profile_string_inserts/threads/4 throughput [5441041.584op/s; 5459876.224op/s] or [-0.173%; +0.173%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_timestamped_x1000 execution_time 4.022ms 4.028ms ± 0.007ms 4.027ms ± 0.001ms 4.028ms 4.030ms 4.032ms 4.124ms 2.42% 11.853 153.861 0.18% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_timestamped_x1000 execution_time [4.027ms; 4.029ms] or [-0.025%; +0.025%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 705.041µs 706.087µs ± 0.493µs 706.046µs ± 0.286µs 706.347µs 706.753µs 707.137µs 709.445µs 0.48% 1.613 9.943 0.07% 0.035µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [706.018µs; 706.155µs] or [-0.010%; +0.010%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0c7d261 1784056062 r1viollet/custom-profile-types
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_serialize_compressed_pprof_timestamped_x1000 execution_time 930.678µs 934.735µs ± 2.162µs 934.072µs ± 1.047µs 935.595µs 938.926µs 940.801µs 941.144µs 0.76% 0.978 0.163 0.23% 0.153µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_serialize_compressed_pprof_timestamped_x1000 execution_time [934.435µs; 935.034µs] or [-0.032%; +0.032%] None None None

Baseline

Baseline benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 113.681µs 114.567µs ± 0.269µs 114.581µs ± 0.145µs 114.693µs 114.984µs 115.442µs 115.919µs 1.17% 0.669 4.051 0.23% 0.019µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [114.530µs; 114.604µs] or [-0.033%; +0.033%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.121ms 4.126ms ± 0.002ms 4.126ms ± 0.001ms 4.127ms 4.129ms 4.131ms 4.145ms 0.47% 3.519 27.493 0.05% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.125ms; 4.126ms] or [-0.007%; +0.007%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profiles_dictionary/profile_string_inserts/threads/1 execution_time 316.048µs 320.229µs ± 3.189µs 320.249µs ± 3.232µs 323.182µs 324.140µs 324.417µs 324.487µs 1.32% 0.012 -1.584 0.94% 1.009µs 1 10
profiles_dictionary/profile_string_inserts/threads/1 throughput 3155753.157op/s 3198000.512op/s ± 31848.612op/s 3197519.382op/s ± 32290.227op/s 3228747.354op/s 3236100.066op/s 3239229.499op/s 3240011.857op/s 1.33% -0.001 -1.585 0.94% 10071.415op/s 1 10
profiles_dictionary/profile_string_inserts/threads/16 execution_time 1.944ms 1.963ms ± 0.008ms 1.963ms ± 0.003ms 1.967ms 1.971ms 1.974ms 1.975ms 0.58% -1.067 1.431 0.38% 0.003ms 1 10
profiles_dictionary/profile_string_inserts/threads/16 throughput 8297642.518op/s 8348338.836op/s ± 33772.556op/s 8345584.879op/s ± 13678.255op/s 8356310.480op/s 8399165.508op/s 8422152.826op/s 8427899.655op/s 0.99% 1.093 1.469 0.38% 10679.820op/s 1 10
profiles_dictionary/profile_string_inserts/threads/2 execution_time 569.538µs 571.969µs ± 2.500µs 570.659µs ± 0.998µs 573.667µs 575.921µs 576.901µs 577.146µs 1.14% 0.945 -0.321 0.41% 0.791µs 1 10
profiles_dictionary/profile_string_inserts/threads/2 throughput 3548495.654op/s 3580676.035op/s ± 15591.097op/s 3588830.763op/s ± 6290.575op/s 3590443.361op/s 3595198.859op/s 3595757.005op/s 3595896.541op/s 0.20% -0.935 -0.345 0.41% 4930.338op/s 1 10
profiles_dictionary/profile_string_inserts/threads/4 execution_time 758.534µs 761.085µs ± 1.550µs 761.214µs ± 0.782µs 761.813µs 763.207µs 763.665µs 763.780µs 0.34% -0.069 -0.504 0.19% 0.490µs 1 10
profiles_dictionary/profile_string_inserts/threads/4 throughput 5362802.645op/s 5381807.626op/s ± 10959.403op/s 5380879.989op/s ± 5529.552op/s 5386457.412op/s 5398181.384op/s 5399549.029op/s 5399890.940op/s 0.35% 0.078 -0.507 0.19% 3465.668op/s 1 10
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profiles_dictionary/profile_string_inserts/threads/1 execution_time [318.252µs; 322.205µs] or [-0.617%; +0.617%] None None None
profiles_dictionary/profile_string_inserts/threads/1 throughput [3178260.900op/s; 3217740.123op/s] or [-0.617%; +0.617%] None None None
profiles_dictionary/profile_string_inserts/threads/16 execution_time [1.958ms; 1.967ms] or [-0.250%; +0.250%] None None None
profiles_dictionary/profile_string_inserts/threads/16 throughput [8327406.774op/s; 8369270.898op/s] or [-0.251%; +0.251%] None None None
profiles_dictionary/profile_string_inserts/threads/2 execution_time [570.419µs; 573.518µs] or [-0.271%; +0.271%] None None None
profiles_dictionary/profile_string_inserts/threads/2 throughput [3571012.751op/s; 3590339.319op/s] or [-0.270%; +0.270%] None None None
profiles_dictionary/profile_string_inserts/threads/4 execution_time [760.125µs; 762.046µs] or [-0.126%; +0.126%] None None None
profiles_dictionary/profile_string_inserts/threads/4 throughput [5375015.043op/s; 5388600.210op/s] or [-0.126%; +0.126%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_timestamped_x1000 execution_time 4.101ms 4.105ms ± 0.007ms 4.105ms ± 0.001ms 4.106ms 4.108ms 4.117ms 4.196ms 2.23% 11.596 149.076 0.17% 0.000ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_timestamped_x1000 execution_time [4.104ms; 4.106ms] or [-0.023%; +0.023%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 714.244µs 715.438µs ± 0.442µs 715.430µs ± 0.277µs 715.707µs 716.170µs 716.377µs 716.992µs 0.22% 0.235 0.583 0.06% 0.031µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [715.377µs; 715.500µs] or [-0.009%; +0.009%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz a7ec21d 1784055175 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_serialize_compressed_pprof_timestamped_x1000 execution_time 954.227µs 959.699µs ± 3.029µs 958.981µs ± 0.900µs 960.361µs 964.478µs 966.929µs 984.020µs 2.61% 3.396 21.816 0.31% 0.214µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_serialize_compressed_pprof_timestamped_x1000 execution_time [959.279µs; 960.119µs] or [-0.044%; +0.044%] None None None

pub fn set_custom_sample_type(
&mut self,
slot: ffi::SampleType,
type_: &str,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In other parts of the code we spell this typ but this works too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants