handle metrics received#251
Open
PizieDust wants to merge 4 commits into
Open
Conversation
hannesm
reviewed
Jun 11, 2026
| let unikernel_name = | ||
| match Vmm_core.Name.name name with | ||
| | Some label -> Vmm_core.Name.Label.to_string label | ||
| | None -> Vmm_core.Name.to_string name |
Contributor
There was a problem hiding this comment.
? When is this supposed to happen, and why is using "Vmm_core.Name.to_string name" the right thing here?
hannesm
reviewed
Jun 11, 2026
| Logs.debug ~src:stats_src (fun m -> | ||
| m "[Stats] Received stats for %s as %a" unikernel_name | ||
| Vmm_core.Stats.pp st); | ||
| Lwt.async (fun () -> |
hannesm
reviewed
Jun 11, 2026
| m "[Stats] Received stats for %s as %a" unikernel_name | ||
| Vmm_core.Stats.pp st); | ||
| Lwt.async (fun () -> | ||
| handle_stats stack instance st ~unikernel_name user >>= function |
Contributor
There was a problem hiding this comment.
why does handle_stats need a stack argument?
hannesm
reviewed
Jun 11, 2026
| @@ -3160,11 +3263,12 @@ | |||
|
|
|||
| let start_background_scaler_scheduler stack store albatross_instances_ref = | |||
Contributor
There was a problem hiding this comment.
I don't quite understand the complexity of this function.
How often and when are "stats_stream" spawned? From my understanding, mollymawk would need one stream for each albatross instance, but it looks like for each user and each albatross there's eventually a stream?
hannesm
reviewed
Jun 11, 2026
Comment on lines
3301
to
3302
| let current_instances = !albatross_instances_ref in | ||
| let valid_keys = Hashtbl.create 5 in |
Contributor
There was a problem hiding this comment.
I don't quite understand why there's need for yet another Hash table, "valid_keys".
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 connects the metrics reeived from albatross with the autoscaling logic to determine if we should spawn new vms or destroy clones.