bash profiler function