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
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in | |
index 502d6b3..8d93b06 100644 | |
--- a/bin/couchdb.tpl.in | |
+++ b/bin/couchdb.tpl.in | |
@@ -185,17 +185,10 @@ start_couchdb () { | |
start_arguments="$start_arguments \\\"$file\\\"" | |
background_start_arguments="$background_start_arguments -c \\\"$file\\\"" | |
done | |
- command="`%ICU_CONFIG% --invoke` \ | |
- %ERL% $interactive_option -smp auto -sasl errlog_type error +K true \ |
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
case vector_clock:compare(RemoteVersion, LocalVersion) of | |
equal -> % TODO assert that info is the same on both remote and local | |
{equal, State}; | |
less -> | |
{equal, State}; | |
greater -> | |
server_list_into_table(RemoteServerList, Servers), | |
NewState = State#membership{ | |
nodes = RemoteNodes, | |
version = RemoteVersion, |
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
function(doc) { | |
emit(doc.parent_id, doc.visits); | |
} | |
function (keys, values, rereduce) { | |
var result = []; | |
var unique_keys = []; | |
function add_to_result(parent_id, visits) { | |
var index = unique_keys.indexOf(parent_id); |
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
-module (config_bench). | |
-export ([doit/2]). | |
doit(Conns, Reps) -> | |
doit(Conns, Reps, false). | |
doit(Conns, Reps, AlsoWrite) -> | |
Conf = couch_config:all(), | |
Begin = erlang:now(), | |
Self = self(), |
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
def upload_runlog(): | |
import sqlite3 as sqlite | |
f = open('/tmp/runlog.txt') | |
db = sqlite.connect('/Users/kocolosk/data/analysis.db') | |
dbc = db.cursor() | |
for line in f: | |
data = line.split('|')[1:-1] | |
run = int(data[0].strip()) | |
trigId = int(data[1].strip()) | |
prescale = float(data[2].strip()) |
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
-module(keysearch_microbench). | |
-compile(export_all). | |
test(ListLength, NumberOfReps) -> | |
crypto:start(), | |
Data = make_data(ListLength), | |
% TestId = key(), % worst-case, missing key | |
TestId = element(1,lists:nth(4,Data)), % some key in the list |
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
#define _XOPEN_SOURCE 600 | |
#ifdef __APPLE__ | |
#define _DARWIN_C_SOURCE | |
#endif | |
#include <unistd.h> | |
#include <fcntl.h> | |
int main(int argc, char *argv[]) { | |
int fd; | |
fd = open(argv[1], O_RDONLY); |
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
drop_cache(Db) -> | |
Cmd = couch_config:get("couchdb", "bin_dir") ++ "/drop_cache " ++ | |
Db#db.filepath, | |
Port = erlang:open_port({spawn, Cmd}, [exit_status]), | |
?LOG_DEBUG("waiting for drop_cache exit while compacting ~p", [Db#db.name]), | |
receive | |
{Port, {exit_status, 0}} -> | |
ok; | |
{Port, {exit_status, Status}} -> | |
?LOG_ERROR("drop_cache on ~s exited with ~p", [Db#db.filepath, Status]), |
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
Day job: Erlanger, databases and distributed systems | |
Favorite Python project: PyPy | |
Favorite Conference: Erlang Factory SF Bay | |
Python Experience Level: ~4 years, mostly scientific computing (PyROOT) and scripting work |
OlderNewer