No title Revision 636236336130 (Tue Apr 05 2011 at 16:04) - Diff Link to this snippet: https://friendpaste.com/45AOdi9MkFrS4BPsov7Lg8 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:4] [hipe] [kernel-poll:true]Eshell V5.8.3 (abort with ^G)1> Apache CouchDB 1.2.0a7a6f6ee-git (LogLevel=info) is starting.Apache CouchDB has started. Time to relax.[info] [<0.37.0>] Apache CouchDB has started on http://127.0.0.1:5984/1> rr("src/couchdb/couch_db.hrl").[att,btree,changes_args,db,db_header,doc,doc_info, extern_resp_args,full_doc_info,group,httpd,index_header, reduce_fold_helper_funs,rev_info,user_ctx,view, view_fold_helper_funs,view_query_args]2> {ok, Db} = couch_db:open_int(<<"large1kb">>, []).{ok,#db{main_pid = <0.179.0>,update_pid = <0.180.0>, compactor_pid = nil, instance_start_time = <<"1301861125471547">>,fd = <0.181.0>, updater_fd = <0.177.0>,fd_ref_counter = <0.183.0>, header = #db_header{disk_version = 5,update_seq = 341301, unused = 0, fulldocinfo_by_id_btree_state = {480339898,{341298,0}}, docinfo_by_seq_btree_state = {480336370,341298}, local_docs_btree_state = {480317540,[]}, purge_seq = 1,purged_docs = 480340016, security_ptr = 480321636,revs_limit = 1000}, committed_update_seq = 341301, fulldocinfo_by_id_btree = #btree{fd = <0.177.0>, root = {480339898,{341298,0}}, extract_kv = #Fun<couch_db_updater.10.91297870>, assemble_kv = #Fun<couch_db_updater.11.29248762>, less = #Fun<couch_btree.5.3534514>, reduce = #Fun<couch_db_updater.12.101621643>}, docinfo_by_seq_btree = #btree{fd = <0.177.0>, root = {480336370,341298}, extract_kv = #Fun<couch_db_updater.13.112240718>, assemble_kv = #Fun<couch_db_updater.14.90543234>, less = #Fun<couch_btree.5.3534514>, reduce = #Fun<couch_db_updater.15.111854220>}, local_docs_btree = #btree{fd = <0.177.0>, root = {480317540,[]}, extract_kv = #Fun<couch_btree.0.8709291>, assemble_kv = #Fun<couch_btree.1.100429438>, less = #Fun<couch_btree.2.3534514>,reduce = nil}, update_seq = 341301,name = <<"large1kb">>, filepath = "/home/fdmanana/git/hub/couchdb/tmp/lib/large1kb.couch", validate_doc_funs = [], security = [{<<"admins">>, {[{<<"names">>,[]},{<<"roles">>,[<<...>>|...]}]}}, {<<"members">>,{[{<<"names">>,[]},{<<"role"...>>,[]}]}}], security_ptr = 480321636, user_ctx = #user_ctx{name = null,roles = [], handler = undefined}, waiting_delayed_commit = nil,revs_limit = 1000, fsync_options = [before_header,after_header,on_file_open], options = []}}3> 3> HBin = term_to_binary(Db#db.header).<<131,104,11,100,0,9,100,98,95,104,101,97,100,101,114,97, 5,98,0,5,53,53,97,0,104,2,98,28,161,...>>4> byte_size(HBin).775> byte_size(element(2, snappy:compress(HBin))).696> byte_size(element(2, snappy:compress(HBin))).697> {ok, Root} = couch_file:pread_binary(Db#db.fd, 480339898).{ok,<<131,104,2,100,0,7,107,112,95,110,111,100,101,108,0, 0,0,3,104,2,109,0,0,0,9,100,111,...>>}8> RootBin = term_to_binary(Root).<<131,109,0,0,0,114,131,104,2,100,0,7,107,112,95,110,111, 100,101,108,0,0,0,3,104,2,109,0,0,...>>9> byte_size(RootBin).120 10> byte_size(element(2, snappy:compress(RootBin))). 10411> SecBin = term_to_binary(Db#db.security).<<131,108,0,0,0,2,104,2,109,0,0,0,6,97,100,109,105,110, 115,104,1,108,0,0,0,2,104,2,109,...>>12> byte_size(SecBin).127 13> byte_size(element(2, snappy:compress(SecBin))). 8014> {ok, Doc4Json} = file:read_file("../seatoncouch/doc_4k.json").{ok,<<"{\n\"data3\":\"ColreUHAtuYoUOx1N4ZloouQt2o6ugnUT6eYtS10gu7niM8i0vEiNufpk1RlMQXaHXlIwQBDsMFDFUQcFeg2vW5eD259Xm\",\n"...>>}15> DocBin = term_to_binary(couch_util:json_decode(Doc4Json)).<<131,104,1,108,0,0,0,9,104,2,109,0,0,0,5,100,97,116,97, 51,109,0,0,0,94,67,111,108,114,...>>16> byte_size(DocBin).594217> byte_size(element(2, snappy:compress(DocBin))). 293018>