feat: move source files into retoor_c directory and add build echo messages
- Add echo messages for both build targets to indicate which project is being compiled - Update isspam.c path to reflect new retoor_c/ subdirectory structure - Keep binary output location unchanged at project root
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# [USAGE]
|
||||
#
|
||||
# This quick & dirty script will summarize the output
|
||||
# generated by the isspam application.
|
||||
# To use, you do:
|
||||
# ./isspam ./your-content/*.txt > output.txt
|
||||
# Then you execute: python totals.py output.txt
|
||||
# - retoor
|
||||
|
||||
import sys
|
||||
import pathlib
|
||||
|
||||
totals = {}
|
||||
count = 0
|
||||
with pathlib.Path(sys.argv[1]).open("r") as f:
|
||||
|
||||
data = f.read()
|
||||
for line in data.split("\n"):
|
||||
if line.startswith("<"):
|
||||
continue
|
||||
parts = line.split(": ")
|
||||
if(len(parts) < 2):
|
||||
continue
|
||||
key = parts[0]
|
||||
if key == "File":
|
||||
count += 1
|
||||
if not key in ["File","Memory usage"]:
|
||||
if key not in totals:
|
||||
totals[key] = 0.0
|
||||
|
||||
value = float(parts[1].replace("%",""))
|
||||
totals[key] += value
|
||||
else:
|
||||
value = parts[1]
|
||||
|
||||
for key, value in totals.items():
|
||||
print(key.count("percentage"))
|
||||
if key.count("percentage") > 0:
|
||||
value = value / count
|
||||
print(key,":",value)
|
||||
Reference in New Issue
Block a user