setup() — netty Function Reference
Architecture documentation for the setup() function in BurstCostExecutorsBenchmark.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 11bdb437_0419_7580_3709_276c968eb1f1["setup()"] 896af492_7d6f_2782_9162_a58f217dc636["PerThreadState"] 11bdb437_0419_7580_3709_276c968eb1f1 -->|defined in| 896af492_7d6f_2782_9162_a58f217dc636 30fce65c_e43b_4fc1_f613_eceff016b47f["setup()"] 30fce65c_e43b_4fc1_f613_eceff016b47f -->|calls| 11bdb437_0419_7580_3709_276c968eb1f1 30fce65c_e43b_4fc1_f613_eceff016b47f["setup()"] 11bdb437_0419_7580_3709_276c968eb1f1 -->|calls| 30fce65c_e43b_4fc1_f613_eceff016b47f style 11bdb437_0419_7580_3709_276c968eb1f1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
microbench/src/main/java/io/netty/microbench/concurrent/BurstCostExecutorsBenchmark.java lines 247–274
@Setup
public void setup(BurstCostExecutorsBenchmark bench) {
final int work = bench.work;
if (work > 0) {
completeTask = new Runnable() {
@Override
public void run() {
Blackhole.consumeCPU(work);
//We can avoid the full barrier cost of a volatile set given that the
//benchmark is focusing on executors with a single threaded consumer:
//it would reduce the cost on consumer side while allowing to focus just
//to the threads hand-off/wake-up cost
DONE_UPDATER.lazySet(PerThreadState.this, completed + 1);
}
};
} else {
completeTask = new Runnable() {
@Override
public void run() {
//We can avoid the full barrier cost of a volatile set given that the
//benchmark is focusing on executors with a single threaded consumer:
//it would reduce the cost on consumer side while allowing to focus just
//to the threads hand-off/wake-up cost
DONE_UPDATER.lazySet(PerThreadState.this, completed + 1);
}
};
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does setup() do?
setup() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/concurrent/BurstCostExecutorsBenchmark.java.
Where is setup() defined?
setup() is defined in microbench/src/main/java/io/netty/microbench/concurrent/BurstCostExecutorsBenchmark.java at line 247.
What does setup() call?
setup() calls 1 function(s): setup.
What calls setup()?
setup() is called by 1 function(s): setup.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free