Warning: I only use terminal emacs so I have no idea how well this will work otherwise.
Here's what I use to get the very latest emacs goodies:
sudo brew install emacs --cocoa --use-git-head --HEAD
diff --git a/rebar.config b/rebar.config | |
index dc5bd68..b475012 100644 | |
--- a/rebar.config | |
+++ b/rebar.config | |
@@ -4,6 +4,6 @@ | |
{edoc_opts, [{preprocess, true}]}. | |
{deps, [ | |
- {mochiweb, "1.5.1", {git, "git://github.com/basho/mochiweb", | |
- {tag, "1.5.1-riak-1.0.x-fixes"}}} |
{mode, max}. | |
{duration, 120}. | |
{concurrent, 30}. | |
{driver, basho_bench_driver_http_raw}. | |
{code_paths, ["deps/ibrowse"]}. |
Indexes = [{<<"index1_bin">>, <<"val">>}, | |
{<<"index2_int">>, 1}], | |
Meta = dict:store(<<"index">>, Indexes, dict:new()), | |
Obj = riakc_obj:new(<<"mybucket">>, <<"mykey">>, <<"myval">>), | |
Obj1 = riakc_obj:update_metadata(Obj, Meta), | |
riakc_pb_socket:put(RiakPid, Obj1). |
(riak@node1)1> schedstat:run(). | |
<0.3422.460> | |
=== in scheduler count=== | |
[{1,65}, | |
{2,5}, | |
{3,0}, | |
{4,0}, | |
{5,14}, | |
{6,73}, | |
{7,0}, |
%% Get current number of online schedulers | |
Schedulers = erlang:system_info(schedulers_online). | |
%% Reduce number online to 1 | |
erlang:system_flag(schedulers_online, 1). | |
%% Restore to original number of online schedulers | |
erlang:system_flag(schedulers_online, Schedulers). |
PBStatusFun = fun() -> | |
VnodePids = [Pid || {_, Pid} <- riak_core_vnode_manager:all_index_pid(riak_kv_vnode)], | |
Links = [process_info(Pid, [links]) || Pid <- VnodePids], | |
WorkerPoolPids = [WPPid || [{links,[_, WPPid]}] <- Links], | |
WorkerPoolLinks = [process_info(Pid, [links]) || Pid <- WorkerPoolPids], | |
PoolboyPids = [PoolboyPid || [{links,[_, PoolboyPid]}] <- WorkerPoolLinks], | |
[poolboy:status(Pid) || Pid <- PoolboyPids] | |
end. | |
PBStatusFun = fun(Index) -> |
Fun = fun(C, File) -> | |
{ok, TLObj} = C:get(<<"luwak_tld">>, File, 2), | |
{_, TLVal} = hd(riak_object:get_contents(TLObj)), | |
FileRoot = proplists:get_value(root, TLVal), | |
{ok, RootObj} = C:get(<<"luwak_node">>, FileRoot), | |
{_, RootVal} = hd(riak_object:get_contents(RootObj)), | |
{_, _, ChunkKeys} = RootVal, | |
[begin | |
case C:get(<<"luwak_node">>, K) of | |
{ok, _} -> |
13:49:27:~ $ erl | |
Erlang R15A (erts-5.9) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false] | |
Eshell V5.9 (abort with ^G) | |
1> test:bad(). | |
** exception error: bad argument | |
in function test:bad/0 (test.erl, line 44) | |
2> |
-ifdef(TEST). | |
test_test() -> | |
%% Start erlang node | |
application:start(sasl), | |
TestNode = list_to_atom("testnode" ++ integer_to_list(element(3, now())) ++ | |
"@localhost"), | |
net_kernel:start([TestNode, longnames]), | |
application:start(riakc), | |
application:start(inets), | |
application:start(mochiweb), |