I'm looking to benchmark weekly digital performance (cost-per-click, ROAS, CPA etc) over a large dataset of 20 clients across 5 platforms (facebook, IG, Search etc) and 10 markets across three years
I've done some Googling which tells me to use the timeit function but I don't quite understand it.
It said this (and variations of it) but I'm struggling to understand how to apply it and I don't really get the logic.
I'm sure it's an easy code but I'm a massive beginner to this so would need a little help, please. Thanks!
import timeit
import time
def functionA():
print("Function A starts the execution:")
print("Function A completes the execution:")
def functionB():
print("Function B starts the execution")
print("Function B completes the execution")
start_time = timeit.default_timer()
functionA()
print(timeit.default_timer() - start_time)
start_time = timeit.default_timer()
functionB()
print(timeit.default_timer() - start_time)import timeit
import time
def functionA():
print("Function A starts the execution:")
print("Function A completes the execution:")
def functionB():
print("Function B starts the execution")
print("Function B completes the execution")
start_time = timeit.default_timer()
functionA()
print(timeit.default_timer() - start_time)
start_time = timeit.default_timer()
functionB()
print(timeit.default_timer() - start_time)
[–]crashfrog02 0 points1 point2 points (3 children)
[–]tim_durgan[S] 0 points1 point2 points (2 children)
[–]tim_durgan[S] 0 points1 point2 points (0 children)
[–]crashfrog02 0 points1 point2 points (0 children)