This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bunyan = require('bunyan'); | |
var restify = require('restify'); | |
var server = restify.createServer({ | |
log: bunyan.createLogger({ | |
name: 'restify', | |
stream: process.stdout, | |
level: process.env.LOG_LEVEL || 'info', | |
serializers: restify.bunyan.serializers | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
putobject-ensureParent | |
value ------------- Distribution ------------- count | |
-1 | 0 | |
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 153 | |
1 | 1 | |
2 | 1 | |
4 | 1 | |
8 | 0 | |
putobject-ensureContentLength |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Globals | |
#export SDC_CLI_URL=https://us-west-1.api.joyentcloud.com | |
#export SDC_CLI_ACCOUNT=mark.cavage | |
#export SDC_CLI_KEY_ID=id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var restify = require('restify'); | |
///--- Globals | |
var NotAuthorizedError = restify.NotAuthorizedError; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Figure out how long it takes for a method to execute. | |
* | |
* @param {func} method to test | |
* @param {int} iterations number of executions. | |
* @param {Array} args to pass in. | |
* @param {T} context the context to call the method in. | |
* @return {int} the time it took, in milliseconds to execute. | |
*/ | |
var bench = function (method, iterations, args, context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!String.prototype.capitalize) { | |
String.prototype.capitalize = function() { | |
return this.charAt(0).toUpperCase() + this.slice(1); | |
} | |
} | |
function assertArg(name, type) { | |
if (typeof(name) !== type) | |
throw new TypeError(name + '(' + type.capitalize() + ') required'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// -*- mode: js -*- | |
var fs = require('fs'); | |
var semver = require('semver'); | |
var spawn = require('child_process').spawn; | |
///--- Globals | |
var deps = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@headnode (bh1-kvm1:0) ~]# plockstat -A -e 6 -p 40679 | |
0 | |
Mutex hold | |
Count nsec Lock Caller | |
------------------------------------------------------------------------------- | |
8421 1751 0xaa5408 beam.smp`erts_smp_mtx_unlock+0x9 | |
2629 1749 0x61dee0 beam.smp`erts_deliver_time+0x4b | |
3257 1395 0xed46e8 beam.smp`erts_alcu_alloc_thr_pref+0xd6 | |
208 21752 0xfffffd7fe97d9a70 beam.smp`do_port_command+0x34c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@headnode (bh1-kvm1:0) ~]# dtrace -n 'profile-997 /execname == "beam.smp"/ { @[stack()] = count(); }' | |
dtrace: description 'profile-997 ' matched 1 probe | |
^C | |
genunix`writev+0x248 | |
unix`sys_syscall+0x17a | |
1 | |
genunix`syscall_mstate+0x91 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@headnode (coal:0) ~]# dtrace -n 'syscall:::entry /execname == "beam.smp"/ { self->s = timestamp; } syscall:::return /self->s/ { @[> | |
dtrace: description 'syscall:::entry ' matched 462 probes | |
^C | |
beam.smp mmap | |
value ------------- Distribution ------------- count | |
8192 | 0 | |
16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2 | |
32768 | 0 |
NewerOlder