diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-11 00:59:40 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-11 00:59:40 +0000 |
commit | 67bf92e65483a1ee5cab5cb0b735bb215c2e6e78 (patch) | |
tree | 4ad2203f54e9fd4957c78d6c92d09908698ca700 /test/etap | |
parent | 961d81a01f9f5f8f3c6807f143ba0678c14c4a28 (diff) |
Micro optimization: when reading an iolist, read up to 8Kbs instead of the 4 bytes length prefix only in the first file read operation.
For reads of small terms/iolist (up to 8Kbs), this speeds up the whole operation. No impact on larger terms/iolists.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1033790 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap')
-rwxr-xr-x | test/etap/010-file-basics.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/etap/010-file-basics.t b/test/etap/010-file-basics.t index a3599f1a..ed71f5e8 100755 --- a/test/etap/010-file-basics.t +++ b/test/etap/010-file-basics.t @@ -84,7 +84,8 @@ test() -> % append_binary == append_iolist? % Possible bug in pread_iolist or iolist() -> append_binary {ok, IOLPos} = couch_file:append_binary(Fd, ["foo", $m, <<"bam">>]), - etap:is({ok, [<<"foombam">>]}, couch_file:pread_iolist(Fd, IOLPos), + {ok, IoList} = couch_file:pread_iolist(Fd, IOLPos), + etap:is(<<"foombam">>, iolist_to_binary(IoList), "Reading an results in a binary form of the written iolist()"), % XXX: How does on test fsync? |