Use cProfile/Profile to profile the performance of code

PHOTO EMBED

Thu Jan 25 2024 04:09:57 GMT+0000 (Coordinated Universal Time)

Saved by @aguest #performance #python

import cProfile

# Use `profile` if `cProfile` isn't available on your OS
# import profile


def adder(x, y):
	return x + y


cProfile.run('adder(10, 20)')
content_copyCOPY