Skip to content

Instantly share code, notes, and snippets.

@ghostsquad
Created February 28, 2019 15:20
Show Gist options
  • Save ghostsquad/98fa9c6cd1e0a743fe4f0f9a3238727b to your computer and use it in GitHub Desktop.
Save ghostsquad/98fa9c6cd1e0a743fe4f0f9a3238727b to your computer and use it in GitHub Desktop.
Measure Prompt Performance
#! /usr/bin/env bash
for i in $(seq 1 10); do
start=$(($(date +%s%N)/1000000))
print -P $PS1 $RPS1;
end=$(($(date +%s%N)/1000000))
echo Execution time was `expr $end - $start` ms.
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment