Skip to content

Commit

Permalink
Updating counter scatterplot script to handle new counter set of colu…
Browse files Browse the repository at this point in the history
…mns.
  • Loading branch information
khuck committed Jul 12, 2024
1 parent bdcad98 commit a768f7a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/scripts/counter_scatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ def shorten_name(name):
index = 0
for row in spamreader:
index = index + 1
if len(row) == 3 and not row[0].strip().startswith("#"):
if len(row) == 4 and not row[1].strip().startswith("#"):
try:
mytup = (float(row[0])/1000000000.0,float(row[1]),counter)
mytup = (float(row[1])/1000000000.0,float(row[2]),counter)
except ValueError as e:
print(index, " Bad row: ", row)
continue
if float(row[0]) > max_timestamp:
max_timestamp = float(row[0])
if row[2] not in dictionary:
dictionary[row[2]] = [mytup]
if float(row[1]) > max_timestamp:
max_timestamp = float(row[1])
if row[3] not in dictionary:
dictionary[row[3]] = [mytup]
else:
dictionary[row[2]].append(mytup)
dictionary[row[3]].append(mytup)
if (index % 100000 == 0):
print (index, 'rows parsed...', end='\r', flush=True)
print ("Parsed", index, "samples")
Expand Down

0 comments on commit a768f7a

Please sign in to comment.