Skip to content

Instantly share code, notes, and snippets.

View excieve's full-sized avatar

Artem Hluvchynskyi excieve

View GitHub Profile
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489022797 1000 2559 100,00 74,27 0,00 100,00 1 191146,12 0,00 3373868 847884 5,18 0,00 0,00 0,00 0 29 71 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489022799 1000 2559 100,00 69,00 0,00 100,00 1 187672,50 0,00 3259252 798528 4,88 0,00 0,00 0,00 0 29 71 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ
fun({Doc}) ->
{Step0} = proplists:get_value(<<"step_0">>, Doc, {nil}),
{Step1} = proplists:get_value(<<"step_1">>, Doc, {nil}),
% This is ugly but sometimes "step_11" exists but is an empty list for instance, thus needs this "unboxing"
Step11 = case proplists:get_value(<<"step_11">>, Doc, nil) of
{Val} -> Val;
NotObject -> NotObject
end,
Calc_income = fun(Value, Acc) ->
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489007095 1000 15938 100,00 65,50 0,00 66,02 0 204105,00 0,00 3477872 1081372 6,61 0,00 1988,00 0,00 0 29 77 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
1489007095 1000 16122 25,00 0,50 0,00 3,22 0 0,00 0,00 153256 101608 0,62 0,00 0,00 0,00 0 1 3 /opt/pypy/bin/pypy /usr/local/bin/couchpy
1489007095 1000 16125 21,50 0,00 0,00 2,71 2 0,00 0,00 152888 102596 0,63 0,00 0,00 0,00 0 1 3 /opt/pypy/bin/pypy /usr/local/bin/couchpy
1489007095 1000 16126 21,00 0,50 0,00 2,71 6 0,00 0,00 151668 101324 0,62 0,00 0,00 0,00 0
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489006611 1000 15577 100,00 66,50 0,00 74,48 3 203927,00 0,00 3473916 1097300 6,71 0,00 1902,00 0,00 0 29 77 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
1489006611 1000 15737 13,00 0,50 0,00 1,69 5 0,00 0,00 49364 21908 0,13 0,00 0,00 0,00 0 1 4 /usr/bin/python /usr/local/bin/couchpy
1489006611 1000 15740 12,00 0,00 0,00 1,50 4 0,00 0,00 49436 21824 0,13 0,00 0,00 0,00 0 1 4 /usr/bin/python /usr/local/bin/couchpy
1489006611 1000 15741 16,50 0,50 0,00 2,13 6 0,00 0,00 50900 23348 0,14 0,00 0,00 0,00 0
# -*- coding: utf-8 -*-
def fun(doc):
if "step_0" not in doc or "changesYear" in doc["step_0"] or "declarationType" not in doc["step_0"]:
return
if doc["step_0"]["declarationType"] != "1":
return
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489004429 1000 13690 100,00 66,00 0,00 66,39 6 186587,50 0,00 3067844 828868 5,07 0,00 1732,00 0,00 0 29 77 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
1489004429 1000 14134 16,00 0,50 0,00 2,08 7 9,50 0,00 35836712 56724 0,35 0,00 0,00 0,00 0 7 9 /opt/couch-chakra/couch-chakra /opt/couch-chakra/main.js
1489004429 1000 14143 20,50 0,00 0,00 2,58 1 177,00 0,00 35835556 55096 0,34 0,00 0,00 0,00 0 7 9 /opt/couch-chakra/couch-chakra /opt/couch-chakra/main.js
1489004429 1000 14144 22,50 0,50 0,00 2,89 0 4,50 0,00 35835356 56220 0,34
(doc) => {
if (!doc.step_0 || doc.step_0.changesYear || !doc.step_0.declarationType)
return;
if (doc.step_0.declarationType != '1')
return;
let declarantSalarySum = 0.0,
familySalarySum = 0.0,
declarantTotalSum = 0.0,
familyTotalSum = 0.0;
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489007605 1000 16314 100,00 61,27 0,00 64,17 2 208944,61 0,00 3334880 840244 5,14 0,00 2049,02 0,00 0 29 77 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd
1489007605 1000 16475 17,65 0,00 0,00 2,23 4 2,94 0,00 112352 72204 0,44 0,00 0,00 0,00 0 2 4 ./bin/couchjs ./share/server/main.js
1489007605 1000 16479 21,08 0,00 0,00 2,67 3 83,33 0,00 109956 69712 0,43 0,00 0,00 0,00 0 2 4 ./bin/couchjs ./share/server/main.js
1489007605 1000 16480 17,65 0,49 0,00 2,29 2 1,96 0,00 111536 71584 0,44 0,00 0,00 0,00 0 2
function(doc) {
if (!doc.step_0 || doc.step_0.changesYear || !doc.step_0.declarationType)
return;
if (doc.step_0.declarationType != '1')
return;
var declarantSalarySum = 0.0,
familySalarySum = 0.0,
declarantTotalSum = 0.0,
familyTotalSum = 0.0;
# Time UID PID %usr %system %guest %CPU CPU minflt/s majflt/s VSZ RSS %MEM kB_rd/s kB_wr/s kB_ccwr/s iodelay threads fd-nr Command
1489014924 1000 30214 100,00 69,00 0,00 100,00 1 186110,00 0,00 3080068 705784 4,32 0,00 2064,00 0,00 0 29 61 /opt/couchdb/bin/../erts-6.2/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchd