summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator/scripts/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/peg_generator/scripts/benchmark.py')
-rw-r--r--Tools/peg_generator/scripts/benchmark.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tools/peg_generator/scripts/benchmark.py b/Tools/peg_generator/scripts/benchmark.py
index d39ac3d..4942b99 100644
--- a/Tools/peg_generator/scripts/benchmark.py
+++ b/Tools/peg_generator/scripts/benchmark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3.9
+#!/usr/bin/env python3
import argparse
import ast
@@ -6,7 +6,12 @@ import sys
import os
from time import time
-import memory_profiler
+try:
+ import memory_profiler
+except ModuleNotFoundError:
+ print("Please run `make venv` to create a virtual environment and install"
+ " all the dependencies, before running this script.")
+ sys.exit(1)
sys.path.insert(0, os.getcwd())
from peg_extension import parse