public void run ( ) throws Exception { if ( config == null ) { return ; } config . channels = 1 ; config . directExecutor = true ; ManagedChannel ch = config . newChannel ( ) ; SimpleRequest req = config . newRequest ( ) ; LoadGenerationWorker worker = new LoadGenerationWorker ( ch , req , config . targetQps , config . duration ) ; final long start = System . nanoTime ( ) ; Histogram histogram = worker . call ( ) ; final long end = System . nanoTime ( ) ; printStats ( histogram , end - start ) ; if ( config . histogramFile != null ) { saveHistogram ( histogram , config . histogramFile ) ; } ch . shutdown ( ) ; }
Start the open loop client .