couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 01/01: TMP - Now with more debug!
Date Wed, 28 Feb 2018 20:00:37 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch jenkins-pre-pse-daemon-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit c67fcb750f903ba579dbba79d0749e6e52477411
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
AuthorDate: Wed Feb 28 12:10:53 2018 -0600

    TMP - Now with more debug!
---
 src/couch/test/couchdb_compaction_daemon_tests.erl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/couch/test/couchdb_compaction_daemon_tests.erl b/src/couch/test/couchdb_compaction_daemon_tests.erl
index 0d7a468..4dd1846 100644
--- a/src/couch/test/couchdb_compaction_daemon_tests.erl
+++ b/src/couch/test/couchdb_compaction_daemon_tests.erl
@@ -21,6 +21,10 @@
         [couch_db_updater, couch_mrview_compactor, couch_compaction_daemon]).
 
 
+log(Fmt, Args) ->
+    io:format(standard_error, Fmt, Args).
+
+
 start() ->
     Ctx = test_util:start_couch(),
     ok = config:set("compaction_daemon", "check_interval", "3", false),
@@ -73,6 +77,8 @@ compaction_daemon_test_() ->
 
 should_compact_by_default_rule(DbName) ->
     {timeout, ?TIMEOUT_S, ?_test(begin
+        log("XKCD: I AM TEST!~n", []),
+
         CompactionMonitor = spawn_compaction_monitor(DbName),
 
         {_, DbFileSize} = get_db_frag(DbName),
@@ -93,6 +99,8 @@ should_compact_by_default_rule(DbName) ->
         {DbFrag2, DbFileSize2} = get_db_frag(DbName),
         {ViewFrag2, ViewFileSize2} = get_view_frag(DbName),
 
+        log("~nXKCD: ~p ~p ~p~n", [DbFileSize, DbFileSize2, DbFrag2]),
+
         ?assert(DbFrag2 < 70),
         ?assert(ViewFrag2 < 70),
 
@@ -195,6 +203,7 @@ get_db_frag(DbName) ->
     couch_db:close(Db),
     FileSize = get_size(file, Info),
     DataSize = get_size(active, Info),
+    log("~nXKCD: ~p ~p ~w~n", [FileSize, DataSize, Info]),
     {round((FileSize - DataSize) / FileSize * 100), FileSize}.
 
 get_view_frag(DbName) ->

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.

Mime
View raw message