Repository navigation
Remove ListenersNotificationBenchmark dependency on the Listeners class - #9
Merged
manoelcampos merged 1 commit intoOct 20, 2026
Conversation
The benchmark now creates the arrays of listeners itself and builds the lists with List.of(array), which gives the same List classes CloudSim Plus uses. This way, it compiles against both CloudSim Plus 8.5.1 and 9, and the cloudsimplus-8 profile doesn't need to exclude it anymore. Closes #8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manoelcampos
deleted the
issue-8-listeners-notification-without-listeners-class
branch
October 20, 2026 21:31
manoelcampos
added a commit
that referenced
this pull request
Oct 20, 2026
…ys (PR #6 and #9) Measures the time and memory to notify listeners stored in immutable lists (as created by the Listeners class from cloudsimplus/cloudsimplus#586) and in plain arrays. Run with -prof gc to see if the for-each loop creates an iterator. The benchmark builds the lists itself with List.of(array), which gives the same List classes CloudSim Plus uses, without depending on the Listeners class. This way, it compiles against both CloudSim Plus 8.5.1 and 9. Closes #8 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
Changes
ListenersNotificationBenchmarkcreates the arrays of listeners itself (newListeners()) and builds the lists withList.of(array), instead of usingListeners.add()(only available in CloudSim Plus 9).This gives the same
Listclasses CloudSim Plus uses (List12for 1 or 2 listeners,ListNfor 0 or 3+).toArray()helper was removed, since the array is now created first and the list is built from it.cloudsimplus-8profile inpom.xml.Tests
Built and ran the benchmark (short run:
-f 1 -wi 1 -i 1 -w 1s -r 1s) with:./mvnw clean package -Pcloudsimplus-8(CloudSim Plus 8.5.1)./mvnw clean package(CloudSim Plus 9.0.0-SNAPSHOT)Both compile and produce similar results.
🤖 Generated with Claude Code