Open
Conversation
Ngoguey42
approved these changes
Sep 6, 2021
Comment on lines
61
to
88
| module type RAW_STATS = sig | ||
| type t = { | ||
| mutable bytes_read : int; | ||
| mutable nb_reads : int; | ||
| mutable bytes_written : int; | ||
| mutable nb_writes : int; | ||
| } | ||
|
|
||
| val fresh_stats : unit -> t | ||
| val reset : t -> unit | ||
| end | ||
|
|
||
| module type IO_STATS = sig | ||
| include RAW_STATS | ||
|
|
||
| val get : unit -> t | ||
| val get_by_file : string -> t | ||
| val get_all : unit -> (string * t) list | ||
| val reset : unit -> unit | ||
| val bytes_read : unit -> int | ||
| val bytes_written : unit -> int | ||
| val nb_reads : unit -> int | ||
| val nb_writes : unit -> int | ||
| end |
There was a problem hiding this comment.
Could you add documentation here to explain the need for 2 separate interfaces?
Contributor
Author
There was a problem hiding this comment.
Added some doc, let me know if its clear.
2be481b to
6da921f
Compare
|
Let's not merge this right now. Let's synchronise the merging of this PR with some other stats refactoring:
|
6da921f to
a868375
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has two objectives:
raw.ml(for instance cactus), and this allows to have the IO stats even ifindexis not used;mergeand the rest of the operations - now stats are reported by file name and so we can report IO stats only due to the merge