1
Fork 0
mirror of https://github.com/Steffo99/appunti-magistrali.git synced 2024-11-23 02:44:17 +00:00
appunti-steffo/8 - Metodologie di sviluppo software/Testing/performance test.md
2023-09-21 02:46:23 +02:00

19 lines
300 B
Markdown

---
aliases: ["benchmark", "bench"]
---
[[test]] che misura e verifica l'efficienza della [[soluzione]].
## Esempio
```python
from time import time_ns
from .calculator import add
def bench_add_1000():
start = time_ns()
for i in range(1000):
add(i, i)
end = time_ns()
return end - start
```