Timep – A next-gen profiler and flamegraph-generator for bash code
Note: this is an update to [this](https://news.ycombinator.com/item?id=44568529) "Show HN" post. timep is a state-of-the-art [debug-]trap-based bash profiler that is efficient and extremely accurate. Unlike other profilers, timep records: 1. per-command wall-clock time 2. per-command CPU time, and 3. the hierarchy of parent function calls /subshells for each command the wall-clock + CPU time combination allows you to determine if a particular command is CPU-bound or IO-bound, and the hierarchical logging gives you a map of how the code actually executed. The standout…
In plain words
Timep is a profiler for bash scripts that measures per-command wall-clock time, CPU time, and tracks the hierarchy of function calls and subshells. It generates flamegraphs showing bash commands and their execution patterns, helping developers identify whether commands are CPU-bound or IO-bound. Designed for developers optimizing bash code performance, timep integrates by sourcing a single file and prepending "timep" to commands.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Note: this is an update to [this](https://news.ycombinator.com/item?id=44568529) "Show HN" post. timep is a state-of-the-art [debug-]trap-based bash profiler that is efficient and extremely accurate. Unlike other profilers, timep records: 1. per-command wall-clock time 2. per-command CPU time, and 3. the hierarchy of parent function calls /subshells for each command the wall-clock + CPU time combination allows you to determine if a particular command is CPU-bound or IO-bound, and the hierarchical logging gives you a map of how the code actually executed. The standout feature of timep is that it will take these records and automatically generate a bash-native flamegraph (that shows bash commands, not syscalls). ------------------------------------------------ USAGE timep is extremely easy to use - just source the `timep.bash` file from the repo and add "timep" in front of whatever you want to profile. for example: . /path/to/timep.bash timep ./some_script echo "stdin" | timep some_function ZERO changes need to be made to the code being profiled! ------------------------------------------------ EXAMPLES [test code that will be profiled](https://github.com/jkool702/timep/blob/main/TESTS/timep.test...) [output profile for that test code](https://github.com/jkool702/timep/blob/main/TESTS/OUTPUT/out...) [flamegraph for that test code](https://github.com/jkool702/timep/blob/main/TESTS/OUTPUT/fla...) [flamegraph from a "real world" test of "forkrun", a parallelization engine written in bash](https://github.com/jkool702/timep/blob/main/TESTS/FORKRUN/fl...) In the "forkrun test", 13 different checksums were computed for ~670k small files on a ramdisk using 28 parallel workers. this was repeated twice. In total, this test ran around 67,000 individual bash commands. [This is its `perf stat` (without timep)](https://github.com/jkool702/timep/blob/main/TESTS/FORKRUN/pe...). ------------------------------------------------ EFFICIENCY AND ACCURACY The forkrun test (see "examples" section above) was basically as demanding of a workload as one can have in bash. it fully utilized 24.5 cores on a 14c/28t i9-7940x CPU, racking up >840 seconds of CPU time in ~34.5 seconds of wall-clock time. When profiling this group of 67,000 commands with timep: 1. the time it took for the code to run with the debug-trap instrumentation was ~38 seconds, an increase of just slightly over 10%. CPU time had a similiar increase. 2. the time profile was ready at +2 minutes (1 minute + 15 seconds after the profiling run finished) 3. the flamegraphs were ready at +5 minutes (4 minute + 15 seconds after the profiling run finished) Note that timep records both "start" and "stop" timestamps for every command, and the debug trap instrumentation runs between one commands "stop" timestamp and the next commands "start" timestamp, meaning the error in the profiles timings is far less than the 10% overhead. Comparing the total (sys+user) CPU time that perf stat gave (without using timep) and the CPU time timep gives (from summing together the CPU time of all 67,000-ish commands), the difference is virtually always less than 0.5%, and often less than 0.2%. Ive seen as low as 0.04%, which is 1/3 of a second on a run that took ~850 seconds of CPU time. ------------------------------------------------ MAJOR CHANGES SINCE THE LAST "SHOW HN" POST 1. CPU time is now recorded too (instead of just wall-clock time). This is done via a loadable builtin that calls `getrusage` and (if available) `clock_gettime` to efficiently and accurate determine the CPU time of the process and all its descendants. 2. the .so file required to use the loadable builtin mentioned in #1 is built directly into the script has an embedded…
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, August 2025
the whole month →
- IS
I built the world's most impractical 1000-pixel display and anyone in the world can draw on it. It draws a single pixel at a time and takes 30-60 minutes to complete a single image. Anyone can participate in the project by voting for the next image to be drawn, and submitting images. https://kilopx.com/
Work · 2025 · benholmen.com

- KT
Kitten TTS is an open-source series of tiny and expressive text-to-speech models for on-device applications. We are excited to launch a preview of our smallest model, which is less than 25 MB. This model has 15M parameters. This release supports English text-to-speech applications in eight voices: four male and four female. The model is quantized to int8 + fp16, and it uses onnx for runtime. The model is designed to run literally anywhere eg. raspberry pi, low-end smartphones, wearables, browsers etc. No GPU required! We're releasing this to give early users a sense of the latency and voices…
Dev tools · 2025 · github.com
- IW
I was wondering how I can arrange objects along a spherical helix path, and read some articles on it. I ended up learning about parametric equations again, and make this visualization to document what I learned: https://visualrambling.space/moving-objects-in-3d/ feel free to visit and let me know what you think!
Life & fun · 2025 · visualrambling.space
- TC
For HTML Day 2025 [1], I made a web service that displays the current sky at your approximate location as a CSS gradient. Colours are simulated on-demand using atmospheric absorption and scattering coefficients. Updates every minute, without the use of client-side JavaScript. Source code and additional information is available on GitHub: https://github.com/dnlzro/horizon [1] https://html.energy/html-day/2025/index.html
Dev tools · 2025 · sky.dlazaro.ca