-
Notifications
You must be signed in to change notification settings - Fork 557
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
Added new flags for timings #3246
Conversation
Your Pull Request was automatically labelled as: "🎈 Feature" |
...ain/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/PerformanceInspector.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/PerformanceSummary.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/PerformanceSummary.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
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.
Generally I am approving this.
I just wanna discuss two points regarding the SummaryOrderType
enum before merging
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Outdated
Show resolved
Hide resolved
…imings-flags switch statement for SummaryOrderType
Kudos, SonarCloud Quality Gate passed! |
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.
looks good
am i allowed to do this
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/PerformanceSummary.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/SummaryOrderType.java
Show resolved
Hide resolved
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/3246/84c075b9
|
can we get some reviews on this? |
src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/TimingsCommand.java
Outdated
Show resolved
Hide resolved
.../thebusybiscuit/slimefun4/core/services/profiler/inspectors/ConsolePerformanceInspector.java
Show resolved
Hide resolved
...b/thebusybiscuit/slimefun4/core/services/profiler/inspectors/PlayerPerformanceInspector.java
Show resolved
Hide resolved
...b/thebusybiscuit/slimefun4/core/services/profiler/inspectors/PlayerPerformanceInspector.java
Outdated
Show resolved
Hide resolved
...b/thebusybiscuit/slimefun4/core/services/profiler/inspectors/PlayerPerformanceInspector.java
Outdated
Show resolved
Hide resolved
.../thebusybiscuit/slimefun4/core/services/profiler/inspectors/ConsolePerformanceInspector.java
Outdated
Show resolved
Hide resolved
Co-authored-by: JustAHuman-xD <[email protected]>
…/profiler/inspectors/PlayerPerformanceInspector.java Co-authored-by: JustAHuman-xD <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
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.
LGTM just one really optional change
*/ | ||
public PlayerPerformanceInspector(@Nonnull Player player) { | ||
public PlayerPerformanceInspector(@Nonnull Player player, @Nonnull SummaryOrderType orderType) { |
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.
You can still use parameters are nonnull by default but other than that this looks good to me
Description
Timings are pretty cool however we can't currently change the order. Now, we can!
This PR allows for 2 new flags
--avg
and--low
.--avg
will order the timings based on average rather than total.--low
will order the timings lowest to highest.In Action
Default (no flags)

Average (

--avg
)Low (

--low
)Proposed changes
Instead of just adding average I decided to make a proper way so that we can add more ordering later. Due to me doing it this way I also added low.
sortTimings
in PerformanceSummaryStill to do
Improve the mess of average sortingSlimefun4/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/profiler/PerformanceSummary.java
Lines 219 to 231 in a488e21
Related Issues (if applicable)
N/A
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values