Performance Monitoring
The @speed decorator helps you identify bottlenecks by measuring execution time.
The @speed Decorator
Measures the execution time of an endpoint and logs it. Useful for identifying slow operations.
routes/data.py
from jec_api.decorators import speed
class HeavyProcess(Route):
@speed
async def post(self):
await costly_operation()
# Logs: [SPEED] HeavyProcess.post | 145.23ms
return {"status": "done"}Need SLAs, error thresholds, or public response headers? Check the Advanced Usage guide.