### "Every program starts off with bugs.### Many programs end up with bugs as well.### There are two corollaries to this:### First, you must test all your### programs straight away.### And second, there's no point in### losing your temper every time they### don't work."###### -- Z80 Users Manual

zero_profiling_counts: Void -> Void; # Reset all profiling times and counts to zero.

get_per_fun_timing_stats_sorted_by_cpu_time_then_callcount # Return raw timing data for client-package processing. : Void -> List { fun_name: String, # "foo::bar": Package-qualified name of some function compiled while profiling_control::compiler_is_set_to_add_per_fun_call_counters_to_deep_syntax() was TRUE. call_count: Int, # Number of times the function was called. cpu_seconds: Float # From number of times SIGVTALRM was handled while this function was executing. We generate SIGVTALRM at 100Hz, so we tally these as 0.01 CPU second each. }; # NB: SIGVTALRM measures only userspace cpu time, not wallclock time and not kernel cpu time.

write_per_fun_time_profile_report0 # Write profiling report to stream. : # This is just the data returned by above call, formatted as text. fil::Output_Stream -> Void; # file is from src/lib/std/src/posix/file.pkg