Skip to content

Commit

Permalink
adding report
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Oct 22, 2023
1 parent 55d6d6b commit 285707c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pyre/calls_poly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from collections import Counter
import pandas as pd
data=[]
import glob, json
names = "./report/*/report/pyre_callgraph.json"
#pyre_callgraph.json"

files = {}
calls=[]
for name in glob.glob(names):
print(name)
with open(name) as fi :
for x in fi:
d = json.loads(x)
data = d["response"]
for x in list(data.keys()): # each function
if (len(data[x])):
for y in data[x]:
if "direct_target" in y:
calls.append( x +"|"+ y["direct_target"])
df= Counter(calls)
df2=pd.DataFrame(df.most_common(), columns=["name","count"])
df2.to_csv("function_calls2.csv")

0 comments on commit 285707c

Please sign in to comment.