From 7a08fee4b5bbcd0056f8ba223a70bb63bd1bc5bc Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 26 Apr 2019 16:29:33 -0400 Subject: [PATCH] Actually fix the verbose range --- confluent_client/bin/stats | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/confluent_client/bin/stats b/confluent_client/bin/stats index f8429dee..768e6d32 100755 --- a/confluent_client/bin/stats +++ b/confluent_client/bin/stats @@ -108,12 +108,14 @@ if args.v and n is not None and nodebydatum: currbinmembers = [] for datum in sorted(nodebydatum): if datum > bins[0]: - while bins[0] < datum: + nextbin = None + while len(bins) and bins[0] < datum: + nextbin = bins[0] bins = bins[1:] - print('Entries between {0} and {1}'.format(currbin, bins[0])) + if not nextbin: + nextbin = np.max(plotdata) + print('Entries between {0} and {1}'.format(currbin, nextbin)) print('-' * 80) - currbin = bins[0] if len(bins) else np.max(plotdata) - bins = bins[1:] print(','.join(sorted(currbinmembers))) print('') print('')