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

fix: line end information for CPython < 3.11 #214

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Conversation

P403n1x87
Copy link
Owner

Description of the Change

We fix the value of the line end exported in binary MOJO files for samples extracted from CPython < 3.11 and make sure that it is set to 0 to indicate that the information is not available.

Regressions

Because no issues have been reported that relate to this fix, we assume that nobody was relying on the previous behaviour.

Verification Process

Added a test case to validate that no incorrect location information is emitted from CPython versions prior to 3.11.

@P403n1x87 P403n1x87 self-assigned this Mar 16, 2024
@P403n1x87 P403n1x87 changed the title fix: end line for CPython < 3.11 fix: line end for CPython < 3.11 Mar 16, 2024
@P403n1x87 P403n1x87 changed the title fix: line end for CPython < 3.11 fix: line end information for CPython < 3.11 Mar 16, 2024
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.87%. Comparing base (ebfd9fd) to head (250d858).

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #214      +/-   ##
==========================================
+ Coverage   68.67%   68.87%   +0.19%     
==========================================
  Files          27       27              
  Lines        2519     2519              
  Branches      774      774              
==========================================
+ Hits         1730     1735       +5     
+ Misses        457      453       -4     
+ Partials      332      331       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Mar 16, 2024

Austin Benchmarks

Running Austin benchmarks with Python 3.10.13

Benchmark Summary

Comparison of dev against 3.6.0.

The following scenarios show a statistically significant difference in performance between the two versions.

Sample Rate Saturation Error Rate Sampling Speed
Wall time [sampling interval: 1] 🟢 🟢 🟡 🟡
RSA keygen [sampling interval: 100] 🔴 🟡 🟡 🟡
Multiprocess wall time [sampling interval: 10] 🟡 🟡 🔴 🟡
Multiprocess wall time [sampling interval: 1000] 🟡 🟡 🟡 🟢

Benchmark Results

Wall time [sampling interval: 1]

Wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 193000 ± 2000 0.99996 ± 2e-05 4e-06 ± 3e-06 7.9 ± 0.3
dev 197000 ± 2000 0.99985 ± 8e-05 4e-06 ± 4e-06 7.7 ± 0.5
Wall time [sampling interval: 10]

Wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 63000 ± 8000 0.36 ± 0.05 1e-05 ± 1e-05 9.6 ± 0.5
dev 63000 ± 8000 0.35 ± 0.06 1.5e-05 ± 1e-05 9.2 ± 0.4
Wall time [sampling interval: 100]

Wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 12400 ± 200 0.0005 ± 0.0001 1e-05 ± 2e-05 9.0 ± 0.5
dev 12300 ± 200 0.0005 ± 0.0002 1e-05 ± 2e-05 8.7 ± 0.5
Wall time [sampling interval: 1000]

Wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 1850 ± 30 0 ± 0 0 ± 0 10 ± 1
dev 1860 ± 20 0 ± 0 0 ± 0 10.6 ± 1.0
CPU time [sampling interval: 1]

CPU time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 62000 ± 2000 1 ± 0 9e-06 ± 6e-06 12.8 ± 0.6
dev 62000 ± 3000 1 ± 0 2e-05 ± 1e-05 12.7 ± 0.5
CPU time [sampling interval: 10]

CPU time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 58000 ± 3000 0.63 ± 0.04 1.8e-05 ± 1e-05 13.1 ± 0.3
dev 60000 ± 3000 0.67 ± 0.06 2e-05 ± 1e-05 13.0 ± 0.5
CPU time [sampling interval: 100]

CPU time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 6360 ± 10 0.0006 ± 0.0002 2e-05 ± 4e-05 16 ± 1
dev 6360 ± 10 0.0006 ± 0.0002 6e-05 ± 9e-05 17 ± 1
CPU time [sampling interval: 1000]

CPU time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 947 ± 1 0 ± 0 0.0001 ± 0.0004 20 ± 2
dev 947 ± 1 0 ± 0 0.0001 ± 0.0002 20 ± 1
RSA keygen [sampling interval: 1]

RSA keygen [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 64000 ± 2000 1 ± 0 0.0001 ± 6e-05 15.1 ± 0.6
dev 60000 ± 7000 1 ± 0 0.00011 ± 0.0001 16 ± 2
RSA keygen [sampling interval: 10]

RSA keygen [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 60000 ± 5000 0.996 ± 0.003 0.0001 ± 0.0001 16 ± 1
dev 61000 ± 6000 0.993 ± 0.007 0.0003 ± 0.0004 16 ± 2
RSA keygen [sampling interval: 100]

RSA keygen [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 6359 ± 6 0.0003 ± 0.0006 0.0001 ± 0.0002 18 ± 2
dev 6340 ± 20 0.002 ± 0.003 0.0005 ± 0.0005 21 ± 3
RSA keygen [sampling interval: 1000]

RSA keygen [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 944.8 ± 0.7 0 ± 0 0.0002 ± 0.0005 22 ± 2
dev 945 ± 1 0 ± 0 0.001 ± 0.001 23 ± 5
Full metrics [sampling interval: 1]

Full metrics [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 78000 ± 2000 1 ± 0 1.3e-05 ± 9e-06 19.4 ± 0.5
dev 77000 ± 3000 1 ± 0 1.4e-05 ± 1e-05 19.4 ± 0.8
Full metrics [sampling interval: 10]

Full metrics [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 75000 ± 1000 0.89 ± 0.04 1e-05 ± 6e-06 19.8 ± 0.6
dev 77000 ± 2000 0.86 ± 0.03 1.2e-05 ± 7e-06 19.5 ± 0.5
Full metrics [sampling interval: 100]

Full metrics [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 12500 ± 200 0.001 ± 0.0002 2e-05 ± 3e-05 24.3 ± 0.8
dev 12400 ± 200 0.001 ± 0.0002 5e-05 ± 4e-05 24 ± 1
Full metrics [sampling interval: 1000]

Full metrics [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 1870 ± 20 0 ± 0 0 ± 0 28 ± 1
dev 1850 ± 20 0 ± 0 0 ± 0 27 ± 2
Multiprocess wall time [sampling interval: 1]

Multiprocess wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 7100 ± 800 1 ± 0 8e-05 ± 4e-05 134 ± 5
dev 7300 ± 200 1 ± 0 0.0001 ± 3e-05 132 ± 3
Multiprocess wall time [sampling interval: 10]

Multiprocess wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 6800 ± 1000 0.999 ± 0.001 6e-05 ± 4e-05 135 ± 6
dev 7340 ± 100 0.998 ± 0.002 0.0001 ± 3e-05 132 ± 2
Multiprocess wall time [sampling interval: 100]

Multiprocess wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 6800 ± 600 0.02 ± 0.004 4e-05 ± 2e-05 130 ± 10
dev 7500 ± 800 0.019 ± 0.002 5e-05 ± 1e-05 130 ± 10
Multiprocess wall time [sampling interval: 1000]

Multiprocess wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.6.0 6720 ± 90 0.0011 ± 0.0002 6e-06 ± 8e-06 39.2 ± 0.9
dev 6800 ± 100 0.001 ± 0.0002 7e-06 ± 8e-06 38.2 ± 0.8

We fix the value of the line end exported in binary MOJO files for
samples extracted from CPython < 3.11 and make sure that it is set to 0
to indicate that the information is not available.
@P403n1x87 P403n1x87 marked this pull request as ready for review March 16, 2024 19:18
@P403n1x87 P403n1x87 merged commit 5303860 into devel Mar 16, 2024
35 of 42 checks passed
@P403n1x87 P403n1x87 deleted the fix/line-end branch March 16, 2024 19:18
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.

1 participant