diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-05-18 19:59:51 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-05-18 19:59:51 +0100 |
commit | 0c791013340788eb4c18af361a57e4e2504a64f7 (patch) | |
tree | 4360f62c91a7a9150c3a74bd6f4beb25b305345f /scripts/size.py | |
parent | 4dc6b969dcd80f7ed05b2d18252785254fcc7963 (diff) | |
parent | 13ee5f9d3e7ad1286703a13a2375ff12ffb4a7e9 (diff) | |
download | verismith-0c791013340788eb4c18af361a57e4e2504a64f7.tar.gz verismith-0c791013340788eb4c18af361a57e4e2504a64f7.zip |
Merge branch 'master' of github.com:ymherklotz/verifuzz
Diffstat (limited to 'scripts/size.py')
-rwxr-xr-x | scripts/size.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/size.py b/scripts/size.py new file mode 100755 index 0000000..5fe2f48 --- /dev/null +++ b/scripts/size.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 + +import subprocess +import statistics + +def file_len(fname): + with open(fname) as f: + for i, l in enumerate(f): + pass + return i + 1 + +def main(): + l = [] + for x in range(0, 10): + subprocess.call(["verifuzz", "generate", "-o", "main.v", "-c", "config.toml"]) + l.append(file_len("main.v")) + print("mean: ", statistics.mean(l)) + print("median: ", statistics.median(l)) + print("stdev: ", statistics.stdev(l)) + print("variance: ", statistics.variance(l)) + +if __name__ == '__main__': + main() |