diff options
author | Eli Bendersky <eliben@google.com> | 2019-08-26 14:03:24 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2019-08-26 14:03:24 -0700 |
commit | 5d5904d2538e054356ac01ba9ef965783f73e36b (patch) | |
tree | fd8e01e00b79989df092ed10e3c6df6e5e8062c5 | |
parent | 3b89659688d9166e6e77963dd6c80a5451ce7112 (diff) | |
download | pycparser-5d5904d2538e054356ac01ba9ef965783f73e36b.tar.gz |
Move .gitattributes to project root dir
-rw-r--r-- | .gitattributes (renamed from utils/benchmark/inputs/.gitattributes) | 0 | ||||
-rw-r--r-- | utils/benchmark/benchmark-parse.py | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/utils/benchmark/inputs/.gitattributes b/.gitattributes index 91c326c..91c326c 100644 --- a/utils/benchmark/inputs/.gitattributes +++ b/.gitattributes diff --git a/utils/benchmark/benchmark-parse.py b/utils/benchmark/benchmark-parse.py index dd98449..003acda 100644 --- a/utils/benchmark/benchmark-parse.py +++ b/utils/benchmark/benchmark-parse.py @@ -17,6 +17,13 @@ from pycparser import c_parser, c_ast def measure_parse(text, n, progress_cb): + """Measure the parsing of text with pycparser. + + text should represent a full file. n is the number of iterations to measure. + progress_cb will be called with the iteration number each time one is done. + + Returns a list of elapsed times, one per iteration. + """ times = [] for i in range(n): parser = c_parser.CParser() |