mirror of https://github.com/pwndbg/pwndbg
14 lines
710 B
Bash
Executable File
14 lines
710 B
Bash
Executable File
#!/bin/bash
|
|
# Benchmark context command
|
|
make test >/dev/null
|
|
git log --abbrev-commit --pretty=oneline HEAD^..HEAD
|
|
gdb ./test \
|
|
-ex "source ../gdbinit.py" \
|
|
-ex "b main" -ex "r" \
|
|
-ex "python import timeit; print(' 1ST RUN:', timeit.repeat('pwndbg.commands.context.context()', repeat=1, number=1, globals=globals())[0])" \
|
|
-ex "si" \
|
|
-ex "python import timeit; print(' 2ND RUN:', timeit.repeat('pwndbg.commands.context.context()', repeat=1, number=1, globals=globals())[0])" \
|
|
-ex "si" \
|
|
-ex "python import timeit; print('MULTIPLE RUNS:', timeit.repeat('pwndbg.commands.context.context()', repeat=1, number=10, globals=globals())[0] / 10)" \
|
|
-ex "quit" | grep 'RUNS*:'
|