Skip to content

Commit

Permalink
irmin-pack.unix: Remove calls to Index.Stats.add_* from Io.
Browse files Browse the repository at this point in the history
This seems to be remnant from before `index` was split into its own
repository.
  • Loading branch information
adatario committed May 9, 2023
1 parent 673819e commit 06bab22
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/irmin-pack/unix/io.ml
Expand Up @@ -168,7 +168,6 @@ module Unix = struct
usage is safe. *)
let buf = Bytes.unsafe_of_string s in
let () = Util.really_write t.fd off buf 0 len in
Index.Stats.add_write len;
()

let write_string t ~off s =
Expand All @@ -195,7 +194,6 @@ module Unix = struct
| true -> raise Errors.Closed
| false ->
let nread = Util.really_read t.fd off len buf in
Index.Stats.add_read nread;
if nread <> len then
(* didn't manage to read the desired amount; in this case the interface seems to
require we return `Read_out_of_bounds FIXME check this, because it is unusual
Expand Down Expand Up @@ -232,7 +230,6 @@ module Unix = struct
~length:len
in
if nread > 0 then (
Index.Stats.add_read nread;
Buffer.add_subbytes buf bytes 0 nread;
if nread = len then aux ~off:Int63.(add off (of_int nread)) count
else count)
Expand Down

0 comments on commit 06bab22

Please sign in to comment.