Search in sources :

Example 1 with AggregatedMetricsRegistry

use of com.linkedin.pinot.common.metrics.AggregatedMetricsRegistry in project pinot by linkedin.

the class ScatterGatherPerfServer method run.

public void run() {
    AggregatedMetricsRegistry metricsRegistry = new AggregatedMetricsRegistry();
    _bakedResponse = new byte[_responseSize];
    for (int i = 0; i < _responseSize; i++) _bakedResponse[i] = 'a';
    MyRequestHandler handler = new MyRequestHandler(new String(_bakedResponse), null, _responseLatencyMs);
    MyRequestHandlerFactory handlerFactory = new MyRequestHandlerFactory(handler);
    _server = new NettyTCPServer(_serverPort, handlerFactory, metricsRegistry);
    Thread serverThread = new Thread(_server, "ServerMain");
    ShutdownHook shutdownHook = new ShutdownHook(_server);
    Runtime.getRuntime().addShutdownHook(shutdownHook);
    serverThread.start();
}
Also used : NettyTCPServer(com.linkedin.pinot.transport.netty.NettyTCPServer) AggregatedMetricsRegistry(com.linkedin.pinot.common.metrics.AggregatedMetricsRegistry)

Aggregations

AggregatedMetricsRegistry (com.linkedin.pinot.common.metrics.AggregatedMetricsRegistry)1 NettyTCPServer (com.linkedin.pinot.transport.netty.NettyTCPServer)1