added coverage script to quickly get overview of instructions used in given krul scripts
This commit is contained in:
parent
9c9319dd8a
commit
2700122ca3
61
coverage
Executable file
61
coverage
Executable file
@ -0,0 +1,61 @@
|
|||||||
|
#!/usr/bin/awk -f
|
||||||
|
/^add/ {krul_add++}
|
||||||
|
/^sub/ {krul_sub++}
|
||||||
|
/^mul/ {krul_mul++}
|
||||||
|
/^div/ {krul_div++}
|
||||||
|
/^mod/ {krul_mod++}
|
||||||
|
/^abs/ {krul_abs++}
|
||||||
|
/^neg/ {krul_neg++}
|
||||||
|
/^inc/ {krul_inc++}
|
||||||
|
/^dec/ {krul_dec++}
|
||||||
|
/^dup/ {krul_dup++}
|
||||||
|
/^rev/ {krul_rev++}
|
||||||
|
/^slc/ {krul_slc++}
|
||||||
|
/^idx/ {krul_idx++}
|
||||||
|
/^cat/ {krul_cat++}
|
||||||
|
/^len/ {krul_len++}
|
||||||
|
/^rot/ {krul_rot++}
|
||||||
|
/^enl/ {krul_enl++}
|
||||||
|
/^gto/ {krul_gto++}
|
||||||
|
/^geq/ {krul_geq++}
|
||||||
|
/^gne/ {krul_gne++}
|
||||||
|
/^glt/ {krul_glt++}
|
||||||
|
/^gle/ {krul_gle++}
|
||||||
|
/^ggt/ {krul_ggt++}
|
||||||
|
/^gge/ {krul_gge++}
|
||||||
|
/^fun/ {krul_fun++}
|
||||||
|
/^ret/ {krul_ret++}
|
||||||
|
/^inp/ {krul_inp++}
|
||||||
|
/^out/ {krul_out++}
|
||||||
|
/^err/ {krul_err++}
|
||||||
|
END {
|
||||||
|
printf("add: %3d\n", krul_add);
|
||||||
|
printf("sub: %3d\n", krul_sub);
|
||||||
|
printf("mul: %3d\n", krul_mul);
|
||||||
|
printf("div: %3d\n", krul_div);
|
||||||
|
printf("mod: %3d\n", krul_mod);
|
||||||
|
printf("abs: %3d\n", krul_abs);
|
||||||
|
printf("neg: %3d\n", krul_neg);
|
||||||
|
printf("inc: %3d\n", krul_inc);
|
||||||
|
printf("dec: %3d\n", krul_dec);
|
||||||
|
printf("dup: %3d\n", krul_dup);
|
||||||
|
printf("rev: %3d\n", krul_rev);
|
||||||
|
printf("slc: %3d\n", krul_slc);
|
||||||
|
printf("idx: %3d\n", krul_idx);
|
||||||
|
printf("cat: %3d\n", krul_cat);
|
||||||
|
printf("len: %3d\n", krul_len);
|
||||||
|
printf("rot: %3d\n", krul_rot);
|
||||||
|
printf("enl: %3d\n", krul_enl);
|
||||||
|
printf("gto: %3d\n", krul_gto);
|
||||||
|
printf("geq: %3d\n", krul_geq);
|
||||||
|
printf("gne: %3d\n", krul_gne);
|
||||||
|
printf("glt: %3d\n", krul_glt);
|
||||||
|
printf("gle: %3d\n", krul_gle);
|
||||||
|
printf("ggt: %3d\n", krul_ggt);
|
||||||
|
printf("gge: %3d\n", krul_gge);
|
||||||
|
printf("fun: %3d\n", krul_fun);
|
||||||
|
printf("ret: %3d\n", krul_ret);
|
||||||
|
printf("inp: %3d\n", krul_inp);
|
||||||
|
printf("out: %3d\n", krul_out);
|
||||||
|
printf("err: %3d\n", krul_err);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user