-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add benchmarks for GlobalRole
s and FolderRole
s
#13
Conversation
For 500 global Roles, the average time for one "scorePercentiles" : {
"0.0" : 120.53523934042522,
"50.0" : 121.5185190145392,
"90.0" : 122.6657498752239,
"95.0" : 122.7264551434821,
"99.0" : 122.7264551434821,
"99.9" : 122.7264551434821,
"99.99" : 122.7264551434821,
"99.999" : 122.7264551434821,
"99.9999" : 122.7264551434821,
"100.0" : 122.7264551434821
},
"scoreUnit" : "us/op", |
The pull request build verifies the observations on my machine: "scorePercentiles" : {
"0.0" : 0.157471799470619,
"50.0" : 0.1620496203417448,
"90.0" : 0.1688005135869144,
"95.0" : 0.16915351346210927,
"99.0" : 0.16915351346210927,
"99.9" : 0.16915351346210927,
"99.99" : 0.16915351346210927,
"99.999" : 0.16915351346210927,
"99.9999" : 0.16915351346210927,
"100.0" : 0.16915351346210927
},
"scoreUnit" : "us/op", Therefore this implementation is 933.84 x faster for 500 roles (would be even faster for a larger number of global roles) than the global roles in Role Strategy plugin🎉 |
GlobalRole
's hasPermission()
GlobalRole
s and FolderRoles
GlobalRole
s and FolderRoles
GlobalRole
s and FolderRole
s
The added benchmark for Folder Roles follows from the configuration @Straber gave us and which was implemented for https://github.com/jenkinsci/role-strategy-plugin/blob/master/src/test/java/jmh/benchmarks/FolderAccessBenchmark.java . Benchmarks on Role Strategy c2bef11 takes an average time of ~77 us. On my machine, the task completes in 4.3 us. So the folder roles are faster too... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Attaching results for future reference because the artifacts may be discarded by the Jenkins CI |
🚢 🇮🇹 ? :) |
Adds a benchmark to compare the performance of
hasPermission()
checks for global roles with those from the Role Strategy Plugin.The benchmark emulates https://github.com/jenkinsci/role-strategy-plugin/blob/master/src/test/java/jmh/benchmarks/RoleMapBenchmark.java