Skip to content

Instantly share code, notes, and snippets.

View g761007's full-sized avatar

Daniel Hsieh g761007

View GitHub Profile
@g761007
g761007 / uncrustify.cfg
Created December 28, 2015 03:06 — forked from chiahsien/uncrustify.cfg
My Uncrustify config for Objective-C
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
/*!
* dump.js, dump mongodb.
* Copyright(c) 2012 Taobao.com
* Author: busi.hyy <busi.hyy@taobao.com>
*
* 每天凌晨3点从mongo dump一份到指定文件夹,前缀为20121113_
* 只保留最近七天的dump文件
* Example: `node dump 127.0.0.1:27071 back database collection1 collection2 ...`
*/
DB.prototype.getCurrentOpStats = function() {
intervals = [1,5,10,30]
waitingForLock = 0;
secsRunningStats = {};
inProg = db.currentOp()["inprog"]
inProg.forEach(function (op) {
if(op["waitingForLock"]) {
waitingForLock += 1;
}