#NEWLINE# def to_dict( self , percentiles = True , raw_histogram = False ) : #NEWLINE# #INDENT# d = self . to_dict_no_histogram ( ) #NEWLINE# if self . histogram : #NEWLINE# #INDENT# h = h . histogram #NEWLINE# d . update ( p25 = h . get_percentile ( 0.25 ) , p50 = h . get_percentile ( 0.5 ) , p75 = h . get_percentile ( 0.75 ) , p90 = h . get_percentile ( 0.9 ) , p99 = h . get_percentile ( 0.99 ) , p999 = h . get_percentile ( 0.999 ) , p9999 = h . get_percentile ( 0.9999 ) ) #NEWLINE# if raw_histogram : #NEWLINE# #INDENT# histogram = list ( h . buckets ) #NEWLINE# while ( histogram and ( histogram [ ( - 1 ) ] == 0 ) ) : #NEWLINE# #INDENT# histogram = histogram [ : ( - 1 ) ] #NEWLINE# #UNINDENT# d . update ( histogram = histogram ) #NEWLINE# #UNINDENT# #UNINDENT# return d