Self times from a profiler call tree

You profile a vibration-analysis script in your IDE. The total run takes 50 s. The profiler's call tree reports these cumulative times, where cumulative time includes every function a function calls:

  • main takes 50 s cumulative and calls load_data, filter_signal and plot_results.
  • load_data takes 12 s cumulative and calls no other profiled function.
  • filter_signal takes 30 s cumulative and calls fft_core.
  • fft_core takes 22 s cumulative and calls no other profiled function.
  • plot_results takes 6 s cumulative and calls no other profiled function.

Fill in each function's self time in seconds and its self time as a percentage of the 50 s run. Enter whole numbers.

FunctionSelf time (s)Share of run (%)
main
load_data
filter_signal
fft_core
plot_results

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Integrated Development Environment (IDE) Questions: