Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/share/systemtap/examples/general/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/systemtap/examples/general/func_time_stats.stp
#!/usr/bin/stap
/*
 * func_time_stats.stp
 * usage: func_time_stats.stp function_probe
 */

global start, intervals

probe $1 { start[tid()] = gettimeofday_us() }
probe $1.return
{
  t = gettimeofday_us() 
  old_t = start[tid()]
  if (old_t) intervals <<< t - old_t
  delete start[tid()]
}
probe end
{
  printf("intervals min:%dus avg:%dus max:%dus count:%d variance:%d\n",
         @min(intervals), @avg(intervals), @max(intervals),
         @count(intervals), @variance(intervals, 3))
  print(@hist_log(intervals));
}

haha - 2025