use of com.tvd12.ezyhttp.server.boot.test.controller.HomeController in project ezyhttp by youngmonkeys.
the class ControllerProxyTest method test.
@Test
public void test() {
ControllerProxy home = new ControllerProxy(new HomeController());
System.out.println(home);
}
use of com.tvd12.ezyhttp.server.boot.test.controller.HomeController in project java-examples by tvd12.
the class PerformanceCompareTest method main.
public static void main(String[] args) {
final EzyBeanContext beanContext = EzyBeanContext.builder().scan("com.tvd12.example.reactive").build();
final HomeController sequenceHomeController = (HomeController) beanContext.getBean(HomeController.class);
final RxHomeController rxHomeController = (RxHomeController) beanContext.getBean(RxHomeController.class);
// warm up
sequenceHomeController.getHomeData();
rxHomeController.getHomeData();
long sequenceCallElapsedTime = Performance.create().loop(100000).test(sequenceHomeController::getHomeData).getTime();
long rxCallElapsedTime = Performance.create().loop(100000).test(rxHomeController::getHomeData).getTime();
System.out.printf("sequence call elapsed time: %d\nreactive call elapsed time: %d\n", sequenceCallElapsedTime, rxCallElapsedTime);
Reactive.destroy();
}
Aggregations