couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [12/12] git commit: updated refs/heads/1994-merge-rcouch to 5b9e825
Date Thu, 09 Jan 2014 00:38:57 GMT
move src/apps/couch_rel -> src/support/couch_rel

couch_rel is not a couchdb application, it has for only purpose to
provide etop to the release.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5b9e825d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5b9e825d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5b9e825d

Branch: refs/heads/1994-merge-rcouch
Commit: 5b9e825d84cb6a109c74bb7870fe1fe72269bc09
Parents: ec7ee43
Author: Benoit Chesneau <benoitc@apache.org>
Authored: Thu Jan 9 01:37:03 2014 +0100
Committer: Benoit Chesneau <benoitc@apache.org>
Committed: Thu Jan 9 01:37:03 2014 +0100

----------------------------------------------------------------------
 Makefile                                 |   3 +
 rebar.config                             |   2 +-
 rel/reltool.config.script                |   2 +-
 src/apps/couch_rel/ebin/couch_rel.app    |  18 ----
 src/apps/couch_rel/src/etop_txt.erl      | 134 --------------------------
 src/support/couch_rel/ebin/couch_rel.app |  18 ++++
 src/support/couch_rel/src/etop_txt.erl   | 134 ++++++++++++++++++++++++++
 7 files changed, 157 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 2b09f43..01858cd 100644
--- a/Makefile
+++ b/Makefile
@@ -43,3 +43,6 @@ rel: deps compile generate
 
 relclean:
 	@rm -rf rel/apache-couchdb
+
+doc:
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 8950111..4901462 100644
--- a/rebar.config
+++ b/rebar.config
@@ -44,7 +44,7 @@
     "src/apps/couch_replicator",
     "src/apps/couch_plugins",
     "src/apps/couch_dbupdates",
-    "src/apps/couch_rel",
+    "src/support/couch_rel",
     "rel"
 ]}.
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/rel/reltool.config.script
----------------------------------------------------------------------
diff --git a/rel/reltool.config.script b/rel/reltool.config.script
index 7e2c6bc..a63c908 100644
--- a/rel/reltool.config.script
+++ b/rel/reltool.config.script
@@ -148,7 +148,7 @@ CouchJSName = proplists:get_value(couchjs_name, Cfg, "couchjs"),
 
         %% misc
         {mkdir, "lib/couch-patches"},
-        {copy, "../src/apps/couch_rel/ebin/etop_txt.beam", "lib/couch-patches"}
+        {copy, "../src/support/couch_rel/ebin/etop_txt.beam", "lib/couch-patches"}
 
     ]}
 ].

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/src/apps/couch_rel/ebin/couch_rel.app
----------------------------------------------------------------------
diff --git a/src/apps/couch_rel/ebin/couch_rel.app b/src/apps/couch_rel/ebin/couch_rel.app
deleted file mode 100644
index 2d207c9..0000000
--- a/src/apps/couch_rel/ebin/couch_rel.app
+++ /dev/null
@@ -1,18 +0,0 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-%%
-% Licensed under the Apache License, Version 2.0 (the "License"); you may not
-% use this file except in compliance with the License. You may obtain a copy of
-% the License at
-%
-%   http://www.apache.org/licenses/LICENSE-2.0
-%
-% Unless required by applicable law or agreed to in writing, software
-% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-% License for the specific language governing permissions and limitations under
-% the License.
-
-{application, couch_rel, [
-    {description,"couch extremely-early boot items"},
-        {modules, [etop_txt]}]}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/src/apps/couch_rel/src/etop_txt.erl
----------------------------------------------------------------------
diff --git a/src/apps/couch_rel/src/etop_txt.erl b/src/apps/couch_rel/src/etop_txt.erl
deleted file mode 100644
index 031f5d8..0000000
--- a/src/apps/couch_rel/src/etop_txt.erl
+++ /dev/null
@@ -1,134 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% compliance with the License. You should have received a copy of the
-%% Erlang Public License along with this software. If not, it can be
-%% retrieved online at http://www.erlang.org/.
-%%
-%% Software distributed under the License is distributed on an "AS IS"
-%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-%% the License for the specific language governing rights and limitations
-%% under the License.
-%%
-%% %CopyrightEnd%
-%%
--module(etop_txt).
--author('siri@erix.ericsson.se').
--author('scott@basho.com').
-
-%%-compile(export_all).
--export([init/1,stop/1]).
--export([do_update/3]).
-
-%%-include("etop.hrl").
--record(etop_proc_info,
-        {pid,
-         mem=0,
-         reds=0,
-         name,
-         runtime=0,
-         cf,
-         mq=0}).
--record(etop_info,
-        {now = {0, 0, 0},
-         n_procs = 0,
-         wall_clock = {0, 0},
-         runtime = {0, 0},
-         run_queue = 0,
-         alloc_areas = [],
-         memi = [{total, 0},
-                 {processes, 0},
-                 {ets, 0},
-                 {atom, 0},
-                 {code, 0},
-                 {binary, 0}],
-         procinfo = []
-        }).
-%%-include("etop_defs.hrl").
--define(SYSFORM,
-        " ~-72w~10s~n"
-        " Load:  cpu  ~8w               Memory:  total    ~8w    binary   ~8w~n"
-        "        procs~8w                        processes~8w    code     ~8w~n"
-        "        runq ~8w                        atom     ~8w    ets      ~8w~n").
--record(opts, {node=node(), port = 8415, accum = false, intv = 5000, lines = 10,
-               width = 700, height = 340, sort = runtime, tracing = on,
-               %% Other state information
-               out_mod=etop_gui, out_proc, server, host, tracer, store,
-               accum_tab, remote}).
-
--import(etop,[loadinfo/1,meminfo/2]).
--import(etop_gui,[formatmfa/1,to_list/1]).
-
--define(PROCFORM,"~-20w~-25s~8w~11w~11w~11w ~-40s~n").
-
-stop(Pid) -> Pid ! stop.
-
-init(Config) ->
-    loop(Config).
-
-loop(Config) ->
-    Info = do_update(Config),
-    receive
-	stop -> stopped;
-	{dump,Fd} -> do_update(Fd,Info,Config), loop(Config);
-	{config,_,Config1} -> loop(Config1)
-    after Config#opts.intv-500 -> loop(Config)
-    end.
-
-do_update(Config) ->
-    Info = etop:update(Config),
-    do_update(standard_io,Info,Config).
-
-do_update(Fd,Info,Config) ->
-    {Cpu,NProcs,RQ,Clock} = loadinfo(Info),
-    io:nl(Fd),
-    writedoubleline(Fd),
-    case Info#etop_info.memi of
-	undefined ->
-	    io:fwrite(Fd, " ~-72w~10s~n"
-		      " Load:  cpu  ~8w~n"
-		      "        procs~8w~n"
-		      "        runq ~8w~n",
-		      [Config#opts.node,Clock,
-		       Cpu,NProcs,RQ]);
-	Memi ->
-	    [Tot,Procs,Atom,Bin,Code,Ets] =
-		meminfo(Memi, [total,processes,atom,binary,code,ets]),
-	    io:fwrite(Fd, ?SYSFORM,
-		      [Config#opts.node,Clock,
-		       Cpu,Tot,Bin,
-		       NProcs,Procs,Code,
-		       RQ,Atom,Ets])
-    end,
-    io:nl(Fd),
-    writepinfo_header(Fd),
-    writesingleline(Fd),
-    writepinfo(Fd,Info#etop_info.procinfo),
-    %%writedoubleline(Fd),
-    %%io:nl(Fd),
-    Info.
-
-writepinfo_header(Fd) ->
-    io:fwrite(Fd,"Pid                 Name or Initial Func         Time       Reds     Memory
      MsgQ Current Function~n",[]).
-
-writesingleline(Fd) ->
-    io:fwrite(Fd,"-------------------------------------------------------------------------------------------------------------------------------~n",[]).
-writedoubleline(Fd) ->
-    io:fwrite(Fd,"===============================================================================================================================~n",[]).
-
-writepinfo(Fd,[#etop_proc_info{pid=Pid,
-			       mem=Mem,
-			       reds=Reds,
-			       name=Name,
-			       runtime=Time,
-			       cf=MFA,
-			       mq=MQ}
-	       |T]) ->
-    io:fwrite(Fd,?PROCFORM,[Pid,to_list(Name),Time,Reds,Mem,MQ,formatmfa(MFA)]),
-    writepinfo(Fd,T);
-writepinfo(_Fd,[]) ->
-    ok.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/src/support/couch_rel/ebin/couch_rel.app
----------------------------------------------------------------------
diff --git a/src/support/couch_rel/ebin/couch_rel.app b/src/support/couch_rel/ebin/couch_rel.app
new file mode 100644
index 0000000..2d207c9
--- /dev/null
+++ b/src/support/couch_rel/ebin/couch_rel.app
@@ -0,0 +1,18 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+%%
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+{application, couch_rel, [
+    {description,"couch extremely-early boot items"},
+        {modules, [etop_txt]}]}.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b9e825d/src/support/couch_rel/src/etop_txt.erl
----------------------------------------------------------------------
diff --git a/src/support/couch_rel/src/etop_txt.erl b/src/support/couch_rel/src/etop_txt.erl
new file mode 100644
index 0000000..031f5d8
--- /dev/null
+++ b/src/support/couch_rel/src/etop_txt.erl
@@ -0,0 +1,134 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(etop_txt).
+-author('siri@erix.ericsson.se').
+-author('scott@basho.com').
+
+%%-compile(export_all).
+-export([init/1,stop/1]).
+-export([do_update/3]).
+
+%%-include("etop.hrl").
+-record(etop_proc_info,
+        {pid,
+         mem=0,
+         reds=0,
+         name,
+         runtime=0,
+         cf,
+         mq=0}).
+-record(etop_info,
+        {now = {0, 0, 0},
+         n_procs = 0,
+         wall_clock = {0, 0},
+         runtime = {0, 0},
+         run_queue = 0,
+         alloc_areas = [],
+         memi = [{total, 0},
+                 {processes, 0},
+                 {ets, 0},
+                 {atom, 0},
+                 {code, 0},
+                 {binary, 0}],
+         procinfo = []
+        }).
+%%-include("etop_defs.hrl").
+-define(SYSFORM,
+        " ~-72w~10s~n"
+        " Load:  cpu  ~8w               Memory:  total    ~8w    binary   ~8w~n"
+        "        procs~8w                        processes~8w    code     ~8w~n"
+        "        runq ~8w                        atom     ~8w    ets      ~8w~n").
+-record(opts, {node=node(), port = 8415, accum = false, intv = 5000, lines = 10,
+               width = 700, height = 340, sort = runtime, tracing = on,
+               %% Other state information
+               out_mod=etop_gui, out_proc, server, host, tracer, store,
+               accum_tab, remote}).
+
+-import(etop,[loadinfo/1,meminfo/2]).
+-import(etop_gui,[formatmfa/1,to_list/1]).
+
+-define(PROCFORM,"~-20w~-25s~8w~11w~11w~11w ~-40s~n").
+
+stop(Pid) -> Pid ! stop.
+
+init(Config) ->
+    loop(Config).
+
+loop(Config) ->
+    Info = do_update(Config),
+    receive
+	stop -> stopped;
+	{dump,Fd} -> do_update(Fd,Info,Config), loop(Config);
+	{config,_,Config1} -> loop(Config1)
+    after Config#opts.intv-500 -> loop(Config)
+    end.
+
+do_update(Config) ->
+    Info = etop:update(Config),
+    do_update(standard_io,Info,Config).
+
+do_update(Fd,Info,Config) ->
+    {Cpu,NProcs,RQ,Clock} = loadinfo(Info),
+    io:nl(Fd),
+    writedoubleline(Fd),
+    case Info#etop_info.memi of
+	undefined ->
+	    io:fwrite(Fd, " ~-72w~10s~n"
+		      " Load:  cpu  ~8w~n"
+		      "        procs~8w~n"
+		      "        runq ~8w~n",
+		      [Config#opts.node,Clock,
+		       Cpu,NProcs,RQ]);
+	Memi ->
+	    [Tot,Procs,Atom,Bin,Code,Ets] =
+		meminfo(Memi, [total,processes,atom,binary,code,ets]),
+	    io:fwrite(Fd, ?SYSFORM,
+		      [Config#opts.node,Clock,
+		       Cpu,Tot,Bin,
+		       NProcs,Procs,Code,
+		       RQ,Atom,Ets])
+    end,
+    io:nl(Fd),
+    writepinfo_header(Fd),
+    writesingleline(Fd),
+    writepinfo(Fd,Info#etop_info.procinfo),
+    %%writedoubleline(Fd),
+    %%io:nl(Fd),
+    Info.
+
+writepinfo_header(Fd) ->
+    io:fwrite(Fd,"Pid                 Name or Initial Func         Time       Reds     Memory
      MsgQ Current Function~n",[]).
+
+writesingleline(Fd) ->
+    io:fwrite(Fd,"-------------------------------------------------------------------------------------------------------------------------------~n",[]).
+writedoubleline(Fd) ->
+    io:fwrite(Fd,"===============================================================================================================================~n",[]).
+
+writepinfo(Fd,[#etop_proc_info{pid=Pid,
+			       mem=Mem,
+			       reds=Reds,
+			       name=Name,
+			       runtime=Time,
+			       cf=MFA,
+			       mq=MQ}
+	       |T]) ->
+    io:fwrite(Fd,?PROCFORM,[Pid,to_list(Name),Time,Reds,Mem,MQ,formatmfa(MFA)]),
+    writepinfo(Fd,T);
+writepinfo(_Fd,[]) ->
+    ok.


Mime
View raw message