Pylot - Dev Update #5 - Web Performance/Load Test Tool (Graphs With MatPlotlib)
Pylot - Dev Update #5 - Web Performance/Load Test Tool (Graphs With MatPlotlib)
Submitted by Corey Goldberg on Wed, 08/08/2007 - 14:48.We performance practioners love our graphs! Visualizing data is helpful in analyzing performance results. Sometimes a quick glance at a graph provides better understanding than a mound of raw or summarized data. Pylot's Results Reporting feature creates graphs of response times (latency) and Throughput.
For the graphing toolkit, Pylot uses Matplotlib to produce fancy graphs like these:
Matplotlib allows you to graph data from Python. Here is a simple script that gives a glimpse of how a line/marker graph is created as a png image:
#!/usr/bin/env python
from pylab import * # Matplotlib
def main():
# sequence of data points to graph (x, y coordinates)
points = [(1, 3), (2, 6), (3, 2), (4, 5)]
graph(points)
def graph(points):
fig = figure(figsize=(6, 2)) # image dimensions
ax = fig.add_subplot(111)
ax.grid(True, color='#666666')
xticks(size='x-small')
yticks(size='x-small')
x_seq = [item[0] for item in points]
y_seq = [item[1] for item in points]
ax.plot(x_seq, y_seq,
color='blue', linestyle='-', linewidth=1.0, marker='o',
markeredgecolor='blue', markerfacecolor='yellow', markersize=2.0)
savefig('graph.png')
if __name__ == '__main__':
main()
The output looks like this:
Related:
- PyLT - Scratching My Itch - New Web Performance/Load Test Tool (Open Source)
- PyLT - Dev Update #1 - Web Performance/Load Test Tool
- PyLT - Dev Update #2 - Web Performance/Load Test Tool
- PyLT - Dev Update #3 - Web Performance/Load Test Tool
- Pylot - Dev Update #4 - Web Performance/Load Test Tool (New Name and Defining Test Cases)
