Skip to content

Instantly share code, notes, and snippets.

@Janmm14
Janmm14 / 0_results.txt
Last active June 21, 2021 15:08
test with single EventBus, multiple listener and also consuming after event call
Reflection: Lambda:
Benchmark Mode Cnt Score Error Units Score Error Units
SpeedTest.bench01_Blackhole thrpt 5 42639,522 ± 71,873 ops/ms 87550,440 ± 173,872 ops/ms
SpeedTest.bench02_Event thrpt 5 317972,720 ± 940,454 ops/ms 375898,768 ± 2543,707 ops/ms
SpeedTest.bench03_Event2 thrpt 5 41659,581 ± 57,944 ops/ms 74706,716 ± 31,157 ops/ms
SpeedTest.bench03a_Event2 thrpt 5 218640,423 ± 151,935 ops/ms 218658,005 ± 533,663 ops/ms
SpeedTest.bench04_Event2 thrpt 5 41641,909 ± 875,904 ops/ms 72745,461 ± 121,890 ops/ms
SpeedTest.bench04a_Event2 thrpt 5 244316,722 ± 1263,248 ops/ms 244601,339 ± 35,782 ops/ms
SpeedTest.bench05_Event2 thrpt 5 41841,968 ± 91,409 ops/ms 74581,825 ± 42,360 ops/ms
SpeedTest.bench05a_Event2 thrpt 5 244563,638 ± 270,481 ops/ms 244608,109 ± 34,251 ops/ms
@Janmm14
Janmm14 / 0_summary.txt
Last active June 21, 2021 13:34
test with single EventBus and multiple listener
Reflection: Lambda:
Benchmark Mode Cnt Score Error Units Score Error Units
SpeedTest.bench01_Blackhole thrpt 5 48064,567 ± 55,784 ops/ms 93798,913 ± 213,667 ops/ms
SpeedTest.bench02_Event thrpt 5 655503,761 ± 1342,351 ops/ms 654931,456 ± 3083,924 ops/ms
SpeedTest.bench03_Event2 thrpt 5 44431,706 ± 32,547 ops/ms 85067,792 ± 72,630 ops/ms
SpeedTest.bench03a_Event2 thrpt 5 218672,952 ± 205,582 ops/ms 218664,236 ± 338,707 ops/ms
SpeedTest.bench03b_Event2 thrpt 5 258171,070 ± 116,473 ops/ms 258216,421 ± 230,563 ops/ms
SpeedTest.bench04_EventNew thrpt 5 44607,214 ± 256,196 ops/ms 89673,637 ± 26,580 ops/ms
SpeedTest.bench04a_New thrpt 5 392437,699 ± 641,088 ops/ms 392637,013 ± 123,884 ops/ms
SpeedTest.bench05_2Event3 thrpt 5 24723,423 ± 11,480 ops/ms 33910,943 ± 214,464 ops/ms
@Janmm14
Janmm14 / 0_summary.txt
Last active June 21, 2021 13:35
test with pauses, new bus per iteration, multiple listeners
Reflection: Lambda:
Benchmark Mode Cnt Score Error Units Score Error Units
SpeedTest.bench01_Blackhole thrpt 5 45899,930 ± 16775,110 ops/ms 63014,354 ± 5546,431 ops/ms
SpeedTest.bench02_Event thrpt 5 522187,218 ± 2289,919 ops/ms 660254,475 ± 3246,517 ops/ms
SpeedTest.bench03_Event2 thrpt 5 44728,308 ± 1565,210 ops/ms 58748,511 ± 1733,119 ops/ms
SpeedTest.bench03a_Event2 thrpt 5 218054,088 ± 1263,766 ops/ms 217935,021 ± 424,009 ops/ms
SpeedTest.bench03b_Event2 thrpt 5 258238,685 ± 75,733 ops/ms 258264,613 ± 73,430 ops/ms
SpeedTest.bench04_EventNew thrpt 5 46922,033 ± 150,599 ops/ms 62505,669 ± 1430,274 ops/ms
SpeedTest.bench04a_New thrpt 5 390785,341 ± 225,126 ops/ms 390904,616 ± 437,327 ops/ms
SpeedTest.bench05_2Event3 thrpt 5 24087,934 ± 1912,104 ops/ms 33810,293 ± 494,113 ops/ms
@Janmm14
Janmm14 / 0_summary.txt
Last active June 21, 2021 13:37
First, simple and smaller EventBus speed test
Reflection: Lambda:
Benchmark Mode Cnt Score Error Units Score Error Units
SpeedTest.bench2Event thrpt 6 92006,731 ± 77,695 ops/ms 161322,551 ± 424,899 ops/ms
SpeedTest.bench2Event2 thrpt 6 92157,840 ± 26,738 ops/ms 163908,712 ± 366,460 ops/ms
SpeedTest.bench2Event3 thrpt 6 46152,362 ± 40,995 ops/ms 84655,500 ± 228,741 ops/ms
SpeedTest.bench2Event_ thrpt 6 93812,233 ± 14,346 ops/ms 162947,301 ± 119,321 ops/ms
SpeedTest.benchBlackhole thrpt 6 106688,489 ± 62,771 ops/ms 193382,220 ± 1528,584 ops/ms
SpeedTest.benchEvent thrpt 6 579507,353 ± 2159,839 ops/ms 721905,842 ± 2497,878 ops/ms
SpeedTest.benchEvent2 thrpt 6 592207,103 ± 2435,624 ops/ms 752155,256 ± 7021,049 ops/ms
SpeedTest.benchEventNew thrpt 6 91279,936 ± 76,264 ops/ms 169623,519 ± 166,267 ops/ms
@Janmm14
Janmm14 / AANoReplacementBench.java
Last active July 13, 2020 09:32
BungeeCord-Chat translateHexColorCodes JMH Benchmark source
package de.janmm14;
import net.md_5.bungee.api.ChatColor;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Threads;
Die Hochrechnungen sind nur da, um die Beobachtungszeit zu minimieren.
Natürlich sorgt das dafür, dass das Ergebnis nicht genau ist. Aber wenn man auch nur so etwas in der Größenordnung herausbekommt.
Bei einer so großen Masse an Spielern eine gewisse statistische Gleichmäßigkeit eintritt.
Dass es nie genau gleich ist, ist klar, aber es ist ähnlich!
Und was ist bitteschön mit Hypxiel, Cubecraft und Mineplex?
Hypixel ist ja am Wochenende sogar über 40000 Spieler? Botten die alle auch, oder wie?
Aber 20000 Spieler können nicht gleichzeitig auf einem Netzwerk sein...