|
|
@ -24,6 +24,28 @@ colorMap = { "md_file_create": cm.tab10(0), |
|
|
|
"write_calls": cm.tab10(8) |
|
|
|
} |
|
|
|
|
|
|
|
markerMap = { "md_file_create": "^", |
|
|
|
"md_file_delete": "v", |
|
|
|
"md_other": ".", |
|
|
|
"md_mod": "<", |
|
|
|
"md_read": ">", |
|
|
|
"read_bytes": "h", |
|
|
|
"read_calls": "H", |
|
|
|
"write_bytes": "D", |
|
|
|
"write_calls": "d" |
|
|
|
} |
|
|
|
|
|
|
|
linestyleMap = { "md_file_create": ":", |
|
|
|
"md_file_delete": ":", |
|
|
|
"md_mod": ":", |
|
|
|
"md_other": ":", |
|
|
|
"md_read": ":", |
|
|
|
"read_bytes": "--", |
|
|
|
"read_calls": "--", |
|
|
|
"write_bytes": "-.", |
|
|
|
"write_calls": "-." |
|
|
|
} |
|
|
|
|
|
|
|
# Plot the timeseries |
|
|
|
def plot(prefix, header, row): |
|
|
|
x = { h : d for (h, d) in zip(header, row)} |
|
|
@ -50,16 +72,23 @@ def plot(prefix, header, row): |
|
|
|
metrics = DataFrame() |
|
|
|
labels = [] |
|
|
|
colors = [] |
|
|
|
style = [] |
|
|
|
for name, group in groups: |
|
|
|
metrics[name] = [x[2] for x in group.values] |
|
|
|
labels.append(name) |
|
|
|
style.append(linestyleMap[name] + markerMap[name]) |
|
|
|
colors.append(colorMap[name]) |
|
|
|
|
|
|
|
fsize = (8, 1 + 1.5 * len(labels)) |
|
|
|
fsizeFixed = (8, 3) |
|
|
|
|
|
|
|
ax = metrics.plot(subplots=True, legend=False, sharex=True, grid = True, sharey=True, marker='.', markersize=10, figsize=fsize, color=colors) |
|
|
|
for (i, l) in zip(range(0, len(labels)), labels): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
if len(labels) < 4 : |
|
|
|
ax = metrics.plot(legend=True, sharex=True, grid = True, sharey=True, markersize=10, figsize=fsizeFixed, color=colors, style=style) |
|
|
|
ax.set_ylabel("Value") |
|
|
|
else: |
|
|
|
ax = metrics.plot(subplots=True, legend=False, sharex=True, grid = True, sharey=True, markersize=10, figsize=fsize, color=colors, style=style) |
|
|
|
for (i, l) in zip(range(0, len(labels)), labels): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
|
|
|
|
pyplot.xlabel("Segment number") |
|
|
|
pyplot.savefig(prefix + "timeseries" + jobid + ".pdf") |
|
|
@ -68,9 +97,14 @@ def plot(prefix, header, row): |
|
|
|
if len(timeseries) <= 50: |
|
|
|
return |
|
|
|
|
|
|
|
ax = metrics.plot(subplots=True, legend=False, sharex=True, grid = True, sharey=True, marker='.', color=colors, markersize=10, xlim=(0,30), figsize=fsize) |
|
|
|
for (i, l) in zip(range(0, len(labels)), labels): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
|
|
|
|
if len(labels) < 4 : |
|
|
|
ax = metrics.plot(legend=True, xlim=(0,30), sharex=True, grid = True, sharey=True, markersize=10, figsize=fsizeFixed, color=colors, style=style) |
|
|
|
ax.set_ylabel("Value") |
|
|
|
else: |
|
|
|
ax = metrics.plot(subplots=True, xlim=(0,30), legend=False, sharex=True, grid = True, sharey=True, markersize=10, figsize=fsize, color=colors, style=style) |
|
|
|
for (i, l) in zip(range(0, len(labels)), labels): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
|
|
|
|
pyplot.xlabel("Segment number") |
|
|
|
pyplot.savefig(prefix + "timeseries" + jobid + "-30.pdf") |
|
|
|