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

20 lines
300 B
Markdown
Raw Normal View History

2023-09-21 00:46:23 +00:00
---
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
```