Skip to content
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

Open
wants to merge 1 commit into
base: feature/perf
Choose a base branch
from

Conversation

edwintorok
Copy link
Contributor

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.

@edwintorok edwintorok changed the base branch from master to feature/perf March 20, 2024 16:08
@edwintorok edwintorok changed the base branch from feature/perf to master March 20, 2024 16:09
@edwintorok edwintorok changed the base branch from master to feature/perf March 20, 2024 16:09
@edwintorok edwintorok changed the base branch from feature/perf to master March 20, 2024 16:14
@edwintorok
Copy link
Contributor Author

This should target the perf feature branch, but that one is out-of-date and needs #5523 first

@edwintorok edwintorok changed the base branch from master to feature/perf March 21, 2024 10:29
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)
@edwintorok edwintorok marked this pull request as ready for review April 15, 2024 09:08

let mutex_execute = Xapi_stdext_threads.Threadext.Mutex.execute

let reporter_async ~shared_page_count ~dss_f =
Copy link
Contributor

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 () =
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use sscanf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants