Merge pull request #7420 from ieQu1/doc-schema-4

docs(schema): Fix definition
This commit is contained in:
Zaiming (Stone) Shi 2022-03-25 21:16:05 +01:00 committed by GitHub
commit 659658a1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1150,8 +1150,7 @@ sysmon {
vm.process_low_watermark = 60% vm.process_low_watermark = 60%
## Enable Long GC monitoring. ## Enable Long GC monitoring.
## Notice: don't enable the monitor in production for: ## Notice: don't enable this monitor in production, because it adds overhead to garbage collection.
## https://github.com/erlang/otp/blob/feb45017da36be78d4c5784d758ede619fa7bfd3/erts/emulator/beam/erl_gc.c#L421
## ##
## @doc sysmon.vm.long_gc ## @doc sysmon.vm.long_gc
## ValueType: Duration | disabled ## ValueType: Duration | disabled

View File

@ -1415,7 +1415,10 @@ fields("sysmon_vm") ->
sc( sc(
hoconsc:union([disabled, duration()]), hoconsc:union([disabled, duration()]),
#{ #{
desc => "Enable Long GC monitoring.<br/>" desc =>
"Enable Long GC monitoring.<br/>\n"
"Notice: don't enable the monitor in production, because it adds overhead to\n"
" garbage collection."
} }
)}, )},
{"long_schedule", {"long_schedule",
@ -2113,12 +2116,12 @@ ref(Module, Field) -> hoconsc:ref(Module, Field).
mk_duration(Desc, OverrideMeta) -> mk_duration(Desc, OverrideMeta) ->
DefaultMeta = #{ DefaultMeta = #{
desc => Desc ++ desc => Desc ++
" time span. A text string with number followed by time units:\n" " Time interval is a string that contains a number followed by time unit:<br/>\n"
"- `ms` for milliseconds,\n" "- `ms` for milliseconds,\n"
"- `s` for seconds,\n" "- `s` for seconds,\n"
"- `m` for minutes,\n" "- `m` for minutes,\n"
"- `h` for hours;\n" "- `h` for hours;\n<br/>"
"or combined representation like `1h5m0s`" "or combination of whereof: `1h5m0s`"
}, },
hoconsc:mk(typerefl:alias("string", duration()), maps:merge(DefaultMeta, OverrideMeta)). hoconsc:mk(typerefl:alias("string", duration()), maps:merge(DefaultMeta, OverrideMeta)).