How can I time a code segment for testing performance with Pythons timeit?

I’ve a python script which works just as it should, but I need to write the execution time. I’ve googled that I should use timeit but I can’t seem to get it to work. My Python script looks like this: import sys import getopt import timeit import random import os import re import ibm_db import … Read more