aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes (renamed from utils/benchmark/inputs/.gitattributes)0
-rw-r--r--utils/benchmark/benchmark-parse.py7
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()