diff options
author | Loïc Hoguin <[email protected]> | 2012-08-27 11:50:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-08-27 11:50:35 +0200 |
commit | e4124de2c71564d37b3732ede0fe1542de1d6f99 (patch) | |
tree | 0e632d9eb44c848bfc4b9190251e7c8566c8debc /src/cowboy_app.erl | |
parent | 50e5a616dcaa765f0c795f565d361196823ed2fe (diff) | |
download | cowboy-e4124de2c71564d37b3732ede0fe1542de1d6f99.tar.gz cowboy-e4124de2c71564d37b3732ede0fe1542de1d6f99.tar.bz2 cowboy-e4124de2c71564d37b3732ede0fe1542de1d6f99.zip |
Switch to Ranch for connection handling
This is the first of many API incompatible changes.
You have been warned.
Diffstat (limited to 'src/cowboy_app.erl')
-rw-r--r-- | src/cowboy_app.erl | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/cowboy_app.erl b/src/cowboy_app.erl index a6c4b18..78c6acd 100644 --- a/src/cowboy_app.erl +++ b/src/cowboy_app.erl @@ -16,7 +16,7 @@ -module(cowboy_app). -behaviour(application). --export([start/2, stop/1, profile_output/0]). %% API. +-export([start/2, stop/1]). %% API. -type application_start_type() :: normal | {takeover, node()} | {failover, node()}. @@ -25,29 +25,8 @@ -spec start(application_start_type(), any()) -> {ok, pid()}. start(_Type, _Args) -> - consider_profiling(), cowboy_sup:start_link(). -spec stop(any()) -> ok. stop(_State) -> ok. - --spec profile_output() -> ok. -profile_output() -> - eprof:stop_profiling(), - eprof:log("procs.profile"), - eprof:analyze(procs), - eprof:log("total.profile"), - eprof:analyze(total). - -%% Internal. - --spec consider_profiling() -> profiling | not_profiling. -consider_profiling() -> - case application:get_env(profile) of - {ok, true} -> - {ok, _Pid} = eprof:start(), - eprof:start_profiling([self()]); - _ -> - not_profiling - end. |