Skip to content

Instantly share code, notes, and snippets.

@tmclnk
Last active June 21, 2022 14:15
Show Gist options
  • Save tmclnk/c51b9faf2ad85371ec8db5adbc7577d2 to your computer and use it in GitHub Desktop.
Save tmclnk/c51b9faf2ad85371ec8db5adbc7577d2 to your computer and use it in GitHub Desktop.
Postman Collection JSON
# Averages
jq ' .results [] | { name: .name , avg : .times | (add/length) }'
# Calculate average time of a particular request (by name)
jq ' .results [] | select(.name | contains("20")).times | add / length'
jq ' .results [] | select(.name | contains("40")).times | add / length'
jq ' .results [] | select(.name | contains("60")).times | add / length'
jq ' .results [] | select(.name | contains("80")).times | add / length'
jq ' .results [] | select(.name | contains("100")).times | add / length'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment