Skip to content

Commit

Permalink
adding function counts
Browse files Browse the repository at this point in the history
adding example project data from analysis of the analysis tools themselves

adding the start of gpt engineer that is running more
  • Loading branch information
mike dupont committed Oct 20, 2023
1 parent 28d41b2 commit d737db4
Show file tree
Hide file tree
Showing 17 changed files with 120,742 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -541,3 +541,6 @@
[submodule "vendor/banuitt"]
path = vendor/banuitt
url = https://github.com/banuitt/Auto-GPT
[submodule "vendor/gpt-engineer"]
path = vendor/gpt-engineer
url = https://github.com/AntonOsika/gpt-engineer
29 changes: 29 additions & 0 deletions pyre/calls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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()):
if (len(data[x])):
for y in data[x]:
if "direct_target" in y:
calls.append( y["direct_target"])
df= Counter(calls)
df2=pd.DataFrame(df.most_common(), columns=["name","count"])
df2.to_csv("function_calls.csv")
#table = pd.pivot_table(df,
# values="count",
# index="name", sort=True,
# # columns=['function'],
# aggfunc="sum")
#table.to_csv("call_sum.csv")
Loading

0 comments on commit d737db4

Please sign in to comment.