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
Using Monte-Carlo Approach for the Producer-Consumer Channel Benchmark #1427
Conversation
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/MonteCarloBasedChannelBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/MonteCarloBasedChannelBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/montecarlo/BenchmarkConfiguration.kt
Outdated
Show resolved
Hide resolved
5adf9f3
to
4567af1
Compare
4567af1
to
b7f6912
Compare
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkWorker.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/jmh/kotlin/benchmarks/ChannelProducerConsumerBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkWorker.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkIteration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkIteration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkIteration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkIteration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/ChannelProducerConsumerBenchmarkIteration.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/jmh/kotlin/benchmarks/ChannelProducerConsumerBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/jmh/kotlin/benchmarks/ChannelProducerConsumerBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/benchmarks/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/benchmarks/channel/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
7bc64bd
to
f84b9fd
Compare
f84b9fd
to
d0c9ecd
Compare
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.
I'd continue reviewing this PR as soon as I am able to do a short complete run (=> "development configuration" is implemented)
benchmarks/src/main/kotlin/macrobenchmarks/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/macrobenchmarks/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
benchmarks/src/main/kotlin/macrobenchmarks/ChannelProducerConsumerMonteCarloBenchmark.kt
Outdated
Show resolved
Hide resolved
9198e45
to
46b79a4
Compare
46b79a4
to
d9233cf
Compare
ccccea1
to
6c4b9c6
Compare
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.
The python script for generating plots does not work if only one dispatcher is used.
6c4b9c6
to
b1fbd15
Compare
4a49830
to
aff8202
Compare
ce84972
to
3acf2c5
Compare
…to test on a wide range of contended scenarios
if (withSelect) { | ||
select<Unit> { | ||
channel.onSend(element) {} | ||
dummy!!.onReceive {} |
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.
Please documents what's the purpose of dummy
/** | ||
* Runs a batch send-receive pairs under the specified workload. | ||
*/ | ||
public abstract class ChannelProdConsBenchmarkIteration( |
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.
Currently, the only possible way to understand the structure of the benchmark (what does it measure, how to interpret its results, how does it split the workload, what's the relationship between producers and consumers, what caveats does it have etc.) can be understood only from studying the source code, which doesn't seem really maintainable.
Please describe the top-level process in the root KDoc
The development mode works under 10 minutes now on macbook pro 13" (2017): BUILD SUCCESSFUL in 8m 38s.
You can see the results on AWS m5.24xlarge in the attached pdf file.
channel-prod-cons-monte-carlo.pdf