-
Notifications
You must be signed in to change notification settings - Fork 21
Separate raw stats from index stats #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/platform.ml
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add documentation here to explain the need for 2 separate interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some doc, let me know if its clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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 PR has two objectives:
raw.ml
(for instance cactus), and this allows to have the IO stats even ifindex
is not used;merge
and the rest of the operations - now stats are reported by file name and so we can report IO stats only due to the merge