root name is "." instead of ""
This commit is contained in:
parent
249796ce6f
commit
a579a8e143
|
@ -66,7 +66,9 @@ module Name = struct
|
||||||
| _ -> false)
|
| _ -> false)
|
||||||
s (* only LDH (letters, digits, hyphen)! *)
|
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
|
let to_list x = x
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ let unikernel_metrics =
|
||||||
|
|
||||||
let rec report_vms t name =
|
let rec report_vms t name =
|
||||||
let name' = Name.drop name in
|
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'));
|
Metrics.add unikernel_metrics (fun x -> x str) (fun d -> d (t, name'));
|
||||||
if Name.is_root name' then () else report_vms t name'
|
if Name.is_root name' then () else report_vms t name'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue