Skip to content

Instantly share code, notes, and snippets.

Mahendran Kathirvel astromahi

  • Chennai, India
View GitHub Profile
@astromahi
astromahi / xmas.go
Created Dec 28, 2015 — forked from bradfitz/xmas.go
Brad's xmas lights
View xmas.go
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
View consul_master.sh
docker run -d --name consul --net=host gliderlabs/consul-server -bootstrap -advertise=192.168.99.100
@astromahi
astromahi / README.md
Created May 24, 2017 — forked from rantav/README.md
Find slow queries in mongo DB
View README.md

A few show tricks to find slow queries in mongodb

Enable profiling

First, you have to enable profiling

> db.setProfilingLevel(1)

Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...

You can’t perform that action at this time.