9if __name__ ==
'__main__':
10 map = {
'bin': {},
'module': {}}
12 for filename
in glob(
'**/tools/*.cc', recursive=
True):
13 package = filename.split(
'/')[0]
14 bin = os.path.basename(filename)[:-3]
15 map[
'bin'][bin] = package
17 for filename
in glob(
'**/modules/**/SConscript', recursive=
True):
18 path = filename.split(
'/')
20 if path[-2] ==
'modules':
21 module = f
'{"_".join(path[:-2])}_modules'
24 map[
'module'][module] = package
26 filename =
'scons_stats.json'
27 with open(filename)
as stats_file:
28 stats = json.load(stats_file)
31 with open(f
'results/{filename}',
'w')
as stats_file:
32 json.dump(stats, stats_file, indent=4)