File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
import pandas_gbq
2
2
import networkx as nx
3
3
import matplotlib .pyplot as plt
4
+ import time
4
5
5
6
def query_ght (queryString ):
6
7
# https://bigquery.cloud.google.com/dataset/ghtorrent-bq:ght
@@ -25,10 +26,16 @@ def plot_commits(commits):
25
26
from `ghtorrent-bq.ght.commits` c
26
27
left join `ghtorrent-bq.ght.projects` p on (p.id = c.project_id)
27
28
left join `ghtorrent-bq.ght.commit_parents` cp on (cp.commit_id = c.id)
28
- where (p.id = 12873840 )
29
+ where (p.id = 5524547 )
29
30
limit 10000
30
31
"""
32
+ import time
31
33
34
+ start = time .time ()
32
35
commits = query_ght (commitQuery )
36
+ getData = time .time ()
37
+ print ("Query Time:\t " + str (getData - start ))
33
38
branchPlot = plot_commits (commits )
39
+ plotTime = time .time ()
40
+ print ("Plot Time:\t " + str (plotTime - getData ))
34
41
plt .savefig ("./imgs/branch_test" )
You can’t perform that action at this time.
0 commit comments