We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e748062 commit 98b3fb8Copy full SHA for 98b3fb8
2 files changed
.github/workflows/main.yml
@@ -51,3 +51,7 @@ jobs:
51
if: matrix.python-version == '3.10'
52
with:
53
flags: unittests
54
+ - name: Benchmark
55
+ run: |
56
+ pip install pyperf
57
+ ./bench.sh
bench.sh
@@ -0,0 +1,9 @@
1
+#!/bin/bash
2
+set -eu
3
+TESTDIR=$(mktemp -d)
4
+python -m pyperf timeit -o "${TESTDIR}/uuid1.json" -s "import uuid" "uuid.uuid1()"
5
+python -m pyperf timeit -o "${TESTDIR}/uuid4.json" -s "import uuid" "uuid.uuid4()"
6
+python -m pyperf timeit -o "${TESTDIR}/uuid6.json" -s "import uuid6" "uuid6.uuid6()"
7
+python -m pyperf timeit -o "${TESTDIR}/uuid7.json" -s "import uuid6" "uuid6.uuid7()"
8
+python -m pyperf compare_to --table "${TESTDIR}/uuid1.json" "${TESTDIR}/uuid4.json" "${TESTDIR}/uuid6.json" "${TESTDIR}/uuid7.json"
9
+rm -rf -- "${TESTDIR}"
0 commit comments