public void createStream ( String scope , String streamName , int minNumSegments , Duration latency ) { DYNAMIC_LOGGER . incCounterValue ( CREATE_STREAM , 1 ) ; DYNAMIC_LOGGER . reportGaugeValue ( OPEN_TRANSACTIONS , 0 , streamTags ( scope , streamName ) ) ; DYNAMIC_LOGGER . reportGaugeValue ( SEGMENTS_COUNT , minNumSegments , streamTags ( scope , streamName ) ) ; DYNAMIC_LOGGER . incCounterValue ( SEGMENTS_SPLITS , 0 , streamTags ( scope , streamName ) ) ; DYNAMIC_LOGGER . incCounterValue ( SEGMENTS_MERGES , 0 , streamTags ( scope , streamName ) ) ; createStreamLatency . reportSuccessValue ( latency . toMillis ( ) ) ; }
This method increments the global and Stream - specific counters of Stream creations initializes other stream - specific metrics and reports the latency of the operation .