qatch

1.0.1 • Public • Published

qatch

Slow query catcher

Installation

npm i -g qatch

Usage

Initialize profiling

qatch --begin --mongo-uri=mongodb://localhost:27017/yolo

Pulling a slow query profile

qatch --report --mongo-uri=mongodb://localhost:27017/yolo

When to use

qatch is meant to be used to catch unexpected queries that aren't using Mongo indices. A example usage would be to do something like the following as part of your CI pipeline:

# Assuming that `qatch` in installed, initialize profiling. 
qatch --begin --mongo-uri=mongodb://localhost:27017/yolo --clean
 
# Run your tests 
npm run test
 
# Pull the report, if any slow queries are found, `qatch` will exit with a 
# non-zero status code. 
qatch --report --mongo-uri=mongodb://localhost:27017/yolo --clean

Package Sidebar

Install

npm i qatch

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

11.7 kB

Total Files

10

Last publish

Collaborators

  • ttacon