Code profiling is a dynamic analysis of a program that measures the complexity of a program, time is taken for code…