Skip to content

Instantly share code, notes, and snippets.

@jcgregorio
Created September 9, 2014 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcgregorio/6cf8c2a5d7bff68e1519 to your computer and use it in GitHub Desktop.
Save jcgregorio/6cf8c2a5d7bff68e1519 to your computer and use it in GitHub Desktop.
%matplotlib inline
import matplotlib.pyplot as plt
import httplib2
import json
import urllib
query = [
("source_type", "skp"),
("config", "8888"),
("config", "gpu")
]
enc = urllib.quote('"' + urllib.urlencode(query) + '"')
h = httplib2.Http()
r, c = h.request('http://skiaperf.com/calc/?formula=fill(filter(%s))&flat=true' % enc)
data = json.loads(c)["Traces"]
fig = plt.figure(figsize=(12,8), dpi=100)
ax = fig.add_subplot(1, 1, 1, yscale='log')
for i in range(0, 30):
ax.plot(data[i]["values"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment