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(macos): report permission error if not root #173

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

P403n1x87
Copy link
Owner

This change ensures that Austin reports the expected error code and message when running without the superuser privileges.

Requirements for Adding, Changing, Fixing or Removing a Feature

Fill out the template below. Any pull request that does not include enough
information to be reviewed in a timely manner may be closed at the maintainers'
discretion.

Description of the Change

Alternate Designs

Regressions

Verification Process

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (0484829) 71.49% compared to head (0484829) 71.49%.

❗ Current head 0484829 differs from pull request most recent head 97b2f91. Consider uploading reports for the commit 97b2f91 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##            devel     #173   +/-   ##
=======================================
  Coverage   71.49%   71.49%           
=======================================
  Files          25       25           
  Lines        2473     2473           
  Branches      730      730           
=======================================
  Hits         1768     1768           
  Misses        381      381           
  Partials      324      324           

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

@github-actions
Copy link

github-actions bot commented Feb 24, 2023

Austin Benchmarks

Running Austin benchmarks with Python 3.10.12

Wall time [sampling interval: 1]

Wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 112000 ± 7000 1 ± 0 2e-05 ± 1e-05 14 ± 1
3.5.0 116000 ± 5000 1 ± 0 1.9e-05 ± 8e-06 13.4 ± 0.7
dev 120000 ± 3000 1 ± 0 2e-05 ± 1e-05 12.9 ± 0.6
Wall time [sampling interval: 10]

Wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 119000 ± 2000 0.545 ± 0.0006 1.6e-05 ± 5e-06 13.1 ± 0.3
3.5.0 117000 ± 5000 0.545 ± 0.001 1.7e-05 ± 8e-06 13.3 ± 0.7
dev 116000 ± 6000 0.545 ± 0.001 1.9e-05 ± 6e-06 13.6 ± 0.7
Wall time [sampling interval: 100]

Wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 10200 ± 400 0.001 ± 0.002 5e-05 ± 7e-05 15.0 ± 0.5
3.5.0 10400 ± 500 0.0007 ± 0.0003 5e-05 ± 5e-05 14.1 ± 0.3
dev 10400 ± 500 0.0006 ± 0.0002 7e-05 ± 5e-05 14.6 ± 0.5
Wall time [sampling interval: 1000]

Wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1860 ± 20 0.0001 ± 0.0002 0 ± 0 17.4 ± 0.5
3.5.0 1860 ± 20 0 ± 0 0 ± 0 17.8 ± 0.4
dev 1850 ± 20 0.0001 ± 0.0002 0 ± 0 17.4 ± 0.7
CPU time [sampling interval: 1]

CPU time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 49000 ± 5000 1 ± 0 4e-05 ± 2e-05 23 ± 1
3.5.0 52000 ± 4000 1 ± 0 4e-05 ± 2e-05 22.4 ± 0.8
dev 53000 ± 3000 1 ± 0 2e-05 ± 1e-05 22.2 ± 0.6
CPU time [sampling interval: 10]

CPU time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 52000 ± 2000 0.9969 ± 0.0005 2e-05 ± 2e-05 22.5 ± 0.7
3.5.0 52000 ± 3000 0.9966 ± 0.0003 3e-05 ± 2e-05 22.3 ± 0.7
dev 53000 ± 3000 0.9962 ± 0.0004 3e-05 ± 2e-05 22.3 ± 0.8
CPU time [sampling interval: 100]

CPU time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 5360 ± 80 0.0011 ± 0.0003 0.0001 ± 8e-05 22.4 ± 0.5
3.5.0 5400 ± 100 0.0011 ± 0.0006 0.0001 ± 0.0001 22.8 ± 0.8
dev 5400 ± 200 0.0009 ± 0.0003 0.0002 ± 0.0001 22.1 ± 0.6
CPU time [sampling interval: 1000]

CPU time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 951 ± 4 0.0001 ± 0.0002 0.0001 ± 0.0002 25.9 ± 0.6
3.5.0 952 ± 3 0 ± 0 0.0002 ± 0.0004 25.5 ± 0.5
dev 955 ± 6 0 ± 0 0.0001 ± 0.0003 25.8 ± 0.6
RSA keygen [sampling interval: 1]

RSA keygen [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 39000 ± 3000 1 ± 0 0.0004 ± 0.0004 25 ± 3
3.5.0 40000 ± 1000 1 ± 0 0.0002 ± 0.0002 24.0 ± 0.7
dev 40200 ± 700 1 ± 0 0.0002 ± 0.0002 24.0 ± 0.5
RSA keygen [sampling interval: 10]

RSA keygen [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 41000 ± 1000 0.984 ± 0.008 0.0002 ± 0.0002 23.9 ± 0.9
3.5.0 39000 ± 1000 0.98 ± 0.02 0.0003 ± 0.0005 25 ± 1
dev 40300 ± 700 0.98 ± 0.01 0.0003 ± 0.0003 24.1 ± 0.6
RSA keygen [sampling interval: 100]

RSA keygen [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 6250 ± 30 0.002 ± 0.001 0.0006 ± 0.0006 29 ± 1
3.5.0 6300 ± 30 0.0013 ± 0.0007 0.0002 ± 0.0002 26.9 ± 1.0
dev 6240 ± 50 0.002 ± 0.002 0.0008 ± 0.0006 30 ± 1
RSA keygen [sampling interval: 1000]

RSA keygen [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 943.8 ± 0.6 0 ± 0 0.0005 ± 0.0007 32 ± 1
3.5.0 942 ± 4 0 ± 0 0.002 ± 0.005 33 ± 3
dev 944 ± 1 0.0002 ± 0.0006 0.002 ± 0.003 32 ± 3
Full metrics [sampling interval: 1]

Full metrics [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 52000 ± 1000 1 ± 0 5e-05 ± 1e-05 29.6 ± 1.0
3.5.0 52000 ± 1000 1 ± 0 4e-05 ± 2e-05 29.3 ± 0.7
dev 51000 ± 2000 1 ± 0 4e-05 ± 2e-05 30 ± 1
Full metrics [sampling interval: 10]

Full metrics [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 51000 ± 2000 1 ± 0 4e-05 ± 1e-05 30 ± 1
3.5.0 52000 ± 2000 1 ± 0 5e-05 ± 2e-05 30 ± 1
dev 52000 ± 2000 1 ± 0 4.9e-05 ± 7e-06 29.5 ± 1.0
Full metrics [sampling interval: 100]

Full metrics [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 9900 ± 400 0.0017 ± 0.0005 9e-05 ± 7e-05 32.8 ± 0.8
3.5.0 10100 ± 200 0.0017 ± 0.0003 0.00014 ± 7e-05 32 ± 1
dev 10000 ± 300 0.0017 ± 0.0006 0.00012 ± 9e-05 33 ± 1
Full metrics [sampling interval: 1000]

Full metrics [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 1840 ± 20 0.0001 ± 0.0003 0.0002 ± 0.0003 36.3 ± 0.8
3.5.0 1869 ± 3 0.0001 ± 0.0002 0.0 ± 0.0001 37.1 ± 1.0
dev 1860 ± 20 0.0002 ± 0.0003 0.0002 ± 0.0003 37.4 ± 1.0
Multiprocess wall time [sampling interval: 1]

Multiprocess wall time [sampling interval: 1]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 3000 ± 200 1 ± 0 0.00014 ± 2e-05 310 ± 20
3.5.0 3400 ± 200 1 ± 0 0.00014 ± 5e-05 280 ± 10
dev 3400 ± 200 1 ± 0 0.00013 ± 5e-05 280 ± 10
Multiprocess wall time [sampling interval: 10]

Multiprocess wall time [sampling interval: 10]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 3100 ± 200 1 ± 0 0.00014 ± 3e-05 300 ± 20
3.5.0 3500 ± 200 1 ± 0 0.00015 ± 4e-05 280 ± 20
dev 3500 ± 200 1 ± 0 0.00015 ± 4e-05 280 ± 10
Multiprocess wall time [sampling interval: 100]

Multiprocess wall time [sampling interval: 100]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 3000 ± 200 0.04 ± 0.02 9e-05 ± 3e-05 310 ± 20
3.5.0 3300 ± 200 0.05 ± 0.01 7e-05 ± 3e-05 290 ± 20
dev 3300 ± 200 0.04 ± 0.02 0.00011 ± 3e-05 290 ± 10
Multiprocess wall time [sampling interval: 1000]

Multiprocess wall time [sampling interval: 1000]

Sample Rate Saturation Error Rate Sampling Speed
3.4.1 2820 ± 100 0.012 ± 0.002 2e-05 ± 2e-05 90 ± 10
3.5.0 3100 ± 100 0.004 ± 0.001 2e-05 ± 2e-05 51 ± 5
dev 3150 ± 80 0.0031 ± 0.0009 1.4e-05 ± 9e-06 47 ± 4

Benchmark Summary

Comparison of dev against 3.5.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] 🟢 🟡 🟡 🟡
Wall time [sampling interval: 100] 🟡 🟡 🟡 🔴
CPU time [sampling interval: 10] 🟡 🟢 🟡 🟡
CPU time [sampling interval: 100] 🟡 🟡 🟡 🟢
RSA keygen [sampling interval: 100] 🔴 🟡 🔴 🔴
Multiprocess wall time [sampling interval: 100] 🟡 🟡 🔴 🟡

@P403n1x87 P403n1x87 changed the base branch from master to devel February 26, 2023 11:39
@P403n1x87 P403n1x87 marked this pull request as ready for review August 12, 2023 13:50
This change ensures that Austin reports the expected error code and
message when running without the superuser privileges.
@P403n1x87 P403n1x87 merged commit a183f2a into devel Aug 12, 2023
16 checks passed
@P403n1x87 P403n1x87 deleted the fix/macos-permissions branch August 12, 2023 13:53
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