private static StatSnapshot createStatSnapshot ( IStats stat , String intervalName , List < String > valueNames ) { StatSnapshot snapshot = new StatSnapshot ( stat . getName ( ) ) ; for ( String valueName : valueNames ) { snapshot . setValue ( valueName , stat . getValueByNameAsString ( valueName , intervalName , TimeUnit . NANOSECONDS ) ) ; } return snapshot ; }
Creates a snapshot for one stat object .