-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mike dupont
committed
Oct 20, 2023
1 parent
d737db4
commit 5a48d6d
Showing
2 changed files
with
40,827 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
Oops, something went wrong.