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

Measure time after serialization. #181

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

TimonPost
Copy link
Member

Description of Changes

Take time after serializing data to stream to be more accurate.

Api of begin_scope is a bit weird now for tests. Could potentially split up in different functions that are used by test/normal code.

@TimonPost TimonPost requested a review from emilk as a code owner January 12, 2024 13:03
Copy link
Collaborator

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Please run cargo bench and see that this doesn't slow down the profiler!

puffin/src/data.rs Outdated Show resolved Hide resolved
puffin/src/merge.rs Outdated Show resolved Hide resolved
@TimonPost
Copy link
Member Author

TimonPost commented Jan 15, 2024

macbook with M1

test result: ok. 0 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running benches/benchmark.rs (target/release/deps/benchmark-9041bbb2765f19e3)
profile_function        time:   [58.279 ns 58.388 ns 58.540 ns]
                        change: [-8.9887% -5.9113% -3.7870%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
  7 (7.00%) high mild
  7 (7.00%) high severe

profile_function_data   time:   [58.990 ns 59.076 ns 59.194 ns]
                        change: [-1.9866% -1.4209% -0.8548%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 13 outliers among 100 measurements (13.00%)
  3 (3.00%) high mild
  10 (10.00%) high severe

profile_scope           time:   [58.219 ns 58.441 ns 58.723 ns]
                        change: [-4.6145% -4.1899% -3.7831%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  3 (3.00%) low mild
  2 (2.00%) high mild
  8 (8.00%) high severe

profile_scope_data      time:   [58.851 ns 58.939 ns 59.049 ns]
                        change: [-0.9931% -0.6718% -0.3677%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 12 outliers among 100 measurements (12.00%)
  1 (1.00%) low mild
  3 (3.00%) high mild
  8 (8.00%) high severe

profile_function_off    time:   [936.78 ps 937.74 ps 938.84 ps]
                        change: [-3.2609% -2.9127% -2.5542%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  5 (5.00%) high mild
  6 (6.00%) high severe

profile_function_data_off
                        time:   [937.98 ps 939.71 ps 941.84 ps]
                        change: [-3.2669% -2.8004% -2.3128%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  3 (3.00%) high mild
  9 (9.00%) high severe

profile_scope_off       time:   [937.85 ps 939.11 ps 940.55 ps]
                        change: [-4.7535% -4.3033% -3.8568%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  5 (5.00%) high mild
  5 (5.00%) high severe

profile_scope_data_off  time:   [945.14 ps 948.97 ps 952.68 ps]
                        change: [-2.4174% -2.1027% -1.8036%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  6 (6.00%) high mild
  1 (1.00%) high severe

Will re-run on my windows PC, there I did not directly detect much changes.

@TimonPost TimonPost requested a review from emilk January 15, 2024 15:36
@TimonPost TimonPost merged commit c4d40a5 into main Jan 15, 2024
5 of 6 checks passed
@TimonPost TimonPost deleted the timon/measure_time_after_serialisation branch January 15, 2024 16:00
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.

2 participants