EpollSocketChannelBenchmark.java — netty Source File
Architecture documentation for EpollSocketChannelBenchmark.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2018 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.microbench.channel.epoll;
import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPromise;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.MultiThreadIoEventLoopGroup;
import io.netty.channel.epoll.EpollIoHandler;
import io.netty.channel.epoll.EpollServerSocketChannel;
import io.netty.channel.epoll.EpollSocketChannel;
import io.netty.microbench.util.AbstractMicrobenchmark;
import io.netty.util.concurrent.Future;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.GroupThreads;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.TearDown;
import java.util.concurrent.TimeUnit;
public class EpollSocketChannelBenchmark extends AbstractMicrobenchmark {
private static final Runnable runnable = new Runnable() {
@Override
public void run() { }
};
private EventLoopGroup group;
private Channel serverChan;
private Channel chan;
private ByteBuf abyte;
private Future<?> future;
@Setup
public void setup() throws Exception {
group = new MultiThreadIoEventLoopGroup(1, EpollIoHandler.newFactory());
// add an arbitrary timeout to make the timer reschedule
future = group.schedule(new Runnable() {
@Override
public void run() {
throw new AssertionError();
// ... (99 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does EpollSocketChannelBenchmark.java do?
EpollSocketChannelBenchmark.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Telemetry subdomain.
Where is EpollSocketChannelBenchmark.java in the architecture?
EpollSocketChannelBenchmark.java is located at microbench/src/main/java/io/netty/microbench/channel/epoll/EpollSocketChannelBenchmark.java (domain: Buffer, subdomain: Telemetry, directory: microbench/src/main/java/io/netty/microbench/channel/epoll).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free