(path)
| 2 | import matplotlib.pyplot as plt |
| 3 | |
| 4 | def read_jam_factor(path): |
| 5 | last_time = 0 |
| 6 | data = [] |
| 7 | with open(path) as f: |
| 8 | line = f.readline() |
| 9 | while line: |
| 10 | s = line.split(' ') |
| 11 | s = [float(x) for x in s] |
| 12 | t = s[0] |
| 13 | |
| 14 | if int(t) >= last_time + 30: |
| 15 | data.append((t, |
| 16 | s[4] / s[1], |
| 17 | s[5] / s[2], |
| 18 | s[6] / s[3])) |
| 19 | print(path) |
| 20 | print(sum(s[4:7]) / sum(s[1:4])) |
| 21 | last_time = int(t) |
| 22 | line = f.readline() |
| 23 | return data |
| 24 | |
| 25 | data_gamma = read_jam_factor('statistics.gamma.log') |
| 26 | data_simple = read_jam_factor('statistics.ttc.log') |
no test coverage detected