diff --git a/src/vmm_core.ml b/src/vmm_core.ml index d5a7ba5..82e9688 100644 --- a/src/vmm_core.ml +++ b/src/vmm_core.ml @@ -66,7 +66,9 @@ module Name = struct | _ -> false) s (* only LDH (letters, digits, hyphen)! *) - let to_string ids = String.concat ~sep:"." ids + let to_string = function + | [] -> "." + | ids -> String.concat ~sep:"." ids let to_list x = x diff --git a/src/vmm_resources.ml b/src/vmm_resources.ml index bfb7695..2c72b99 100644 --- a/src/vmm_resources.ml +++ b/src/vmm_resources.ml @@ -83,7 +83,7 @@ let unikernel_metrics = let rec report_vms t name = let name' = Name.drop name in - let str = if Name.is_root name' then "." else Name.to_string name' in + let str = Name.to_string name' in Metrics.add unikernel_metrics (fun x -> x str) (fun d -> d (t, name')); if Name.is_root name' then () else report_vms t name'