-
-
Save cleverca22/0bab7eb2836733c7136fef05f8ab34b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo cputime | |
jq < $1 '.cpuTime' | |
echo envs | |
jq < $1 '.envs | "num: \(.number) elements: \(.elements) mbyte: \(.bytes/1024/1024)"' | |
echo lists | |
jq < $1 '.list | "concats: \(.concats) elements: \(.elements) mbyte: \(.bytes/1024/1024)"' | |
echo values | |
jq < $1 '.values | "num: \(.number) mbyte: \(.bytes/1024/1024)"' | |
echo symbols | |
jq < $1 '.symbols | "num: \(.number) mbyte: \(.bytes/1024/1024)"' | |
echo sets | |
jq < $1 '.sets | "num: \(.number) elements: \(.elements) mbyte: \(.bytes/1024/1024)"' | |
echo | |
jq < $1 '"// used: \(.nrOpUpdates / 1000 | round)k times, copying \(.nrOpUpdateValuesCopied /1024 | round)k values"' | |
jq < $1 '"lookups: \(.nrLookups), thunks: \(.nrThunks)"' | |
jq < $1 '"prims called: \(.nrPrimOpCalls), funcs called: \(.nrFunctionCalls)"' | |
jq < $1 '.gc | "heap: \(.heapSize), total gbytes: \(.totalBytes/1024/1024/1024)"' | |
jq < $1 '.primops | to_entries | sort_by(.value) | reverse | .[0:4] | map("\(.key) called \(.value) times") | join(", ")' | |
#jq < $1 '.functions | sort_by(.count) | reverse | .[0:3] | map("\(.file):\(.line):\(.column) \(.name) ran \(.count)")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment