Skip to content

Commit

Permalink
Merge pull request #98 from Feuerlabs/uw-pr84
Browse files Browse the repository at this point in the history
Uw pr84
  • Loading branch information
tolbrino authored Sep 12, 2017
2 parents 6e8aa87 + 37faa00 commit c4afd6d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_build
.eunit
deps
*.o
Expand All @@ -8,4 +9,4 @@ ebin
rel/example_project
.concrete/DEV_MODE
.rebar
logs
logs
11 changes: 8 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
{deps,
[
{parse_trans, ".*", {git, "git://github.com/uwiger/parse_trans.git", {tag, "3.0.0"}}},
{meck, ".*", {git, "git://github.com/eproxus/meck.git", {tag ,"0.8.4"}}},
{folsom, ".*", {git, "git://github.com/folsom-project/folsom", {tag, "0.8.5"}}},
{hut, ".*", {git, "git://github.com/tolbrino/hut.git", "v1.1.1"}},
{setup, ".*", {git, "git://github.com/uwiger/setup.git", "e4a089f743505f1166e026c51989f041da7b2f6d"}}
{hut, ".*", {git, "git://github.com/tolbrino/hut.git", {tag, "v1.1.1"}}},
{setup, ".*", {git, "git://github.com/uwiger/setup.git", {tag, "1.8.2"}}}
]}.

{profiles,
[
{test, [{deps, [{meck, {git, "git://github.com/eproxus/meck.git", {tag,"0.8.4"}}}]}]},
{docs, [{deps, [{edown, {git, "git://github.com/uwiger/edown.git", {branch, "master"}}}]}]}
]}.

{erl_opts,
Expand Down
28 changes: 28 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[{<<"bear">>,
{git,"git://github.com/boundary/bear.git",
{ref,"119234548783af19b8ec75c879c5062676b92571"}},
1},
{<<"edown">>,
{git,"git://github.com/uwiger/edown.git",
{ref,"b7c8eb0ac1859f8fce11cbfe3526f5ec83194776"}},
1},
{<<"folsom">>,
{git,"git://github.com/folsom-project/folsom",
{ref,"38e2cce7c64ce1f0a3a918d90394cfc0a940b1ba"}},
0},
{<<"hut">>,
{git,"git://github.com/tolbrino/hut.git",
{ref,"025540398478ab6f95932c3234382ac5bb21ad3e"}},
0},
{<<"meck">>,
{git,"git://github.com/eproxus/meck",
{ref,"dde759050eff19a1a80fd854d7375174b191665d"}},
1},
{<<"parse_trans">>,
{git,"git://github.com/uwiger/parse_trans.git",
{ref,"a210adafdfbb904d156d8f22abd5fb58fc17de1e"}},
0},
{<<"setup">>,
{git,"git://github.com/uwiger/setup.git",
{ref,"76124131ac11bdb0112fb47a244784e152531dad"}},
0}].
22 changes: 15 additions & 7 deletions test/exometer_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ init_per_testcase(Case, Config) when
init_per_testcase(Case, Config) when
Case == test_ext_predef;
Case == test_function_match ->
ok = application:set_env(stdlib, exometer_predefined, {script, "../../test/data/test_defaults.script"}),
ok = application:set_env(
stdlib, exometer_predefined,
{script, file_path("test/data/test_defaults.script")}),
{ok, StartedApps} = exometer_test_util:ensure_all_started(exometer_core),
ct:log("StartedApps = ~p~n", [StartedApps]),
[{started_apps, StartedApps} | Config];
Expand Down Expand Up @@ -374,22 +376,26 @@ test_aggregate(_Config) ->
ok.

test_history1_slide(_Config) ->
test_history(1, slide, "../../test/data/puts_time_hist1.bin").
test_history(1, slide, file_path("test/data/puts_time_hist1.bin")).

test_history1_slotslide(_Config) ->
test_history(1, slot_slide, "../../test/data/puts_time_hist1.bin").
test_history(1, slot_slide, file_path("test/data/puts_time_hist1.bin")).

test_history1_folsom(_Config) ->
test_history(1, folsom, "../../test/data/puts_time_hist1.bin").
test_history(1, folsom, file_path("test/data/puts_time_hist1.bin")).

test_history4_slide(_Config) ->
test_history(4, slide, "../../test/data/puts_time_hist4.bin").
test_history(4, slide, file_path("test/data/puts_time_hist4.bin")).

test_history4_slotslide(_Config) ->
test_history(4, slot_slide, "../../test/data/puts_time_hist4.bin").
test_history(4, slot_slide, file_path("test/data/puts_time_hist4.bin")).

test_history4_folsom(_Config) ->
test_history(4, folsom, "../../test/data/puts_time_hist4.bin").
test_history(4, folsom, file_path("test/data/puts_time_hist4.bin")).

file_path(F) ->
filename:join(code:lib_dir(exometer_core), F).


test_ext_predef(_Config) ->
{ok, [{total, _}]} = exometer:get_value([preset, func], [total]),
Expand Down Expand Up @@ -527,6 +533,8 @@ crash_fun() ->
[{value, 1}].

load_data(F, M) ->
ct:log("load_data(~s,...)", [F]),
ct:log("CWD = ~p", [element(2, file:get_cwd())]),
{ok, [Values]} = file:consult(F),
Stats = bear:get_statistics(Values),
_T1 = os:timestamp(),
Expand Down

0 comments on commit c4afd6d

Please sign in to comment.