Commit b189523c authored by nagayama15's avatar nagayama15

集計を効率化

parent 75db8254
......@@ -16,14 +16,10 @@ f() {
h() {
R=$(f $@)
FILES=$(echo $R | wc -l)
FUNCS=$(echo $R | awk '{a+=$2} END {print a}')
BLOCKS=$(echo $R | awk '{a+=$3} END {print a}')
BITS=$(echo $R | awk '{a+=$4} END {print a}')
echo "file, funcs, blocks, bits"
echo $R
echo "files: $FILES, funcs: $FUNCS, blocks: $BLOCKS, bits: $BITS"
echo "$R"
echo "$R" | awk '{f++; a+=$2; b+=$3; c+=$4} END {print "files: " f ", funcs: " a ", blocks: " b ", bits: " c}'
}
h obj/example/8cc/stage1-wm/*-log.txt
......
......@@ -15,13 +15,10 @@ f() {
h() {
R=$(f $@)
FILES=$(echo $R | wc -l)
SIZE=$(echo $R | awk '{a+=$2} END {print a}')
LINES=$(echo $R | awk '{a+=$3} END {print a}')
echo "name, size, lines"
echo "$R"
echo "files: $FILES, size: $SIZE, lines: $LINES"
echo "$R" | awk '{f++; s+=$2; l+=$3} END {print "files: " f ", size: " s ", lines: " l}'
}
h `ls example/8cc/8cc/*.c | awk -F 'example/8cc/8cc/utiltest.c' '{print $NF}'`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment