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
CP-38343: xenopsd: GC and memory RRD stats #5522
base: feature/perf
Are you sure you want to change the base?
CP-38343: xenopsd: GC and memory RRD stats #5522
Conversation
This should target the perf feature branch, but that one is out-of-date and needs #5523 first |
Based on xapi_stats.ml, but heavily refactored. Signed-off-by: Edwin Török <edvin.torok@citrix.com> (cherry picked from commit 40d3aa7923c7a5c7654d9e83508e52b3b7c3840a) (cherry picked from commit b30f2310e6087ef59c486410f079175bf36aa705)
5559e8f
to
b203731
Compare
|
||
let mutex_execute = Xapi_stdext_threads.Threadext.Mutex.execute | ||
|
||
let reporter_async ~shared_page_count ~dss_f = |
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.
there is already a start_async
in rrdd_plugin.ml, why not use that one?
observe_stats stats ; | ||
stats |> List.rev_map (fun x -> (Rrd.Host, x)) | ||
|
||
let generate_stats () = |
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.
emm, two functions with the same name, one shadowing another? maybe define an inner function?
match Astring.String.cut ~sep:" " s with None -> s | Some (v, _) -> v | ||
|
||
(** [parse_value s] parses values of the form ' N kB' or ' N'. *) | ||
let parse_value s = s |> Astring.String.trim |> drop_unit |> Int64.of_string |
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.
I would use sscanf
Based on xapi_stats.ml, but heavily refactored.
Signed-off-by: Edwin Török edvin.torok@citrix.com
This is xapi-project/xenopsd#772, but I squashed and rebased the 2 commits on top of latest master, and ran
ocamlformat
, and fixed some dune warnings.Original commits in xenopsd repo:
(cherry picked from commit 40d3aa7923c7a5c7654d9e83508e52b3b7c3840a)
(cherry picked from commit b30f2310e6087ef59c486410f079175bf36aa705)
So far I've only compile tested this change, hence a draft.