Package org.elasticsearch.monitor.jvm

Examples of org.elasticsearch.monitor.jvm.JvmService


                .put("monitor.os.refresh_interval", 0)
                .put("monitor.process.refresh_interval", 0)
                .put("monitor.network.refresh_interval", 0)
        ).node();

        JvmService jvmService = node.injector().getInstance(JvmService.class);
        OsService osService = node.injector().getInstance(OsService.class);
        ProcessService processService = node.injector().getInstance(ProcessService.class);
        NetworkService networkService = node.injector().getInstance(NetworkService.class);

        while (true) {
            jvmService.stats();
            osService.stats();
            processService.stats();
            networkService.stats();
        }
    }
View Full Code Here


                    new InetSocketTransportAddress("localhost", 44200),
                    new InetSocketTransportAddress("localhost", 44200)
            );
            when(httpInfo.address()).thenReturn(boundTransportAddress);

            JvmService jvmService = mock(JvmService.class);
            JvmStats jvmStats = mock(JvmStats.class);
            JvmStats.Mem jvmStatsMem = mock(JvmStats.Mem.class);
            ByteSizeValue heapByteSizeValueMax = mock(ByteSizeValue.class);
            when(heapByteSizeValueMax.bytes()).thenReturn(123456L);
            when(jvmStatsMem.getHeapMax()).thenReturn(heapByteSizeValueMax);
            when(jvmStatsMem.getHeapUsed()).thenReturn(heapByteSizeValueMax);

            when(jvmStats.mem()).thenReturn(jvmStatsMem);
            when(jvmService.stats()).thenReturn(jvmStats);
            bind(JvmService.class).toInstance(jvmService);

            bind(ReferenceResolver.class).to(GlobalReferenceResolver.class).asEagerSingleton();

            ThreadPool threadPool = new ThreadPool(getClass().getName());
View Full Code Here

TOP

Related Classes of org.elasticsearch.monitor.jvm.JvmService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.