@@ -0,0 +1,7164 @@
+#!/usr/bin/env python                                                                                                                    %0A                                                                                                                                     %0Aimport math                                                                                                                          %0Afrom prettytable import PrettyTable                                                                                                  %0A                                                                                                                                     %0Adef get_hours(start, end):                                                                                                           %0A    if start == end:                                                                                                                 %0A        return str(start)                                                                                                            %0A    return %22%7Bstart%7D %3C= hours %3C %7Bend%7D%22.format(start=start, end=end)                                                                            %0A                                                                                                                                     %0Adef get_days(start, end):                                                                                                            %0A    start = float(start)/24                                                                                                          %0A    end = float(end)/24                                                                                                              %0A    if end %3C 1:                                                                                                                      %0A        return %22%3C1%22                                                                                                                  %0A    if start %3C 1 and end %3C 2:                                                                                                        %0A        return %22~1%22                                                                                                                  %0A    return %22%7Bstart%7D - %7Bend%7D%22.format(                                                                                                 %0A        start=int(math.floor(start)),                                                                                                %0A        end=int(math.ceil(end)),                                                                                                     %0A    )                                                                                                                                %0A                                                                                                                                     %0Adef get_table_name(start):                                                                                                           %0A    return %22metrics_%7Bstart%7D%22.format(start=start)                                                                                     %0A                                                                                                                                     %0Adef get_window_size(start, factor):                                                                                                  %0A    return start / factor + 1                                                                                                        %0A                                                                                                                                     %0Adef get_sstables(start, end, window_size):                                                                                           %0A    return %22%7Bstart%7D - %7Bend%7D%22.format(                                                                                                 %0A        start=int(math.ceil(float(start)/window_size)),                                                                                                     %0A        end=int(math.ceil(float(end)/window_size))+1,                                                                                                         %0A    )                                                                                                                                %0A                                                                                                                                     %0Adef get_line(start, end, factor):                                                                                                    %0A    ttl_hours = get_hours(start,end)                                                                                                     %0A    table_name = get_table_name(start)                                                                                               %0A    window_size = get_window_size(start, factor)                                                                                     %0A    sstables = get_sstables(start, end, window_size)                                                                                 %0A    return (ttl_hours, table_name, window_size, sstables)                                                                           %0A                                                                                                                                     %0A                                                                                                                                     %0Attl = 1                                                                                                                              %0Afactor = 20                                                                                                                           %0A                                                                                                                                     %0At = PrettyTable(%5B%22TTL hours%22, %22table_name%22, %22window_size (hours)%22, %22sstables%22%5D)                                                           %0At.add_row(get_line(0, 1, factor))                                                                                      %0A%0A# generate up to 5 years                                                                                                              %0Awhile ttl %3C 5*365*24:                                                                                                                %0A    t.add_row(get_line(ttl, ttl*2, factor))                                                                                      %0A    ttl *= 2                                                                                                                         %0A                                                                                                                                     %0At.align = 'r'                                                                                                                        %0Aprint t 

add mauro's initial script