Skip to content

Commit f3d2a60

Browse files
author
Rayce Rossum
committed
Add timing and larger test project id
1 parent 412f1e4 commit f3d2a60

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

imgs/branch_test.png

12.6 KB
Loading

src/big_cloud_scratch.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pandas_gbq
22
import networkx as nx
33
import matplotlib.pyplot as plt
4+
import time
45

56
def query_ght(queryString):
67
# https://bigquery.cloud.google.com/dataset/ghtorrent-bq:ght
@@ -25,10 +26,16 @@ def plot_commits(commits):
2526
from `ghtorrent-bq.ght.commits` c
2627
left join `ghtorrent-bq.ght.projects` p on (p.id = c.project_id)
2728
left join `ghtorrent-bq.ght.commit_parents` cp on (cp.commit_id = c.id)
28-
where (p.id = 12873840)
29+
where (p.id = 5524547)
2930
limit 10000
3031
"""
32+
import time
3133

34+
start = time.time()
3235
commits = query_ght(commitQuery)
36+
getData = time.time()
37+
print("Query Time:\t" + str(getData - start))
3338
branchPlot = plot_commits(commits)
39+
plotTime = time.time()
40+
print("Plot Time:\t" + str(plotTime - getData))
3441
plt.savefig("./imgs/branch_test")

0 commit comments

Comments
 (0)