Bläddra i källkod

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

docs(schema): Fix definition
Zaiming (Stone) Shi 3 år sedan
förälder
incheckning
659658a1ed
2 ändrade filer med 8 tillägg och 6 borttagningar
  1. 1 2
      apps/emqx/etc/emqx.conf
  2. 7 4
      apps/emqx/src/emqx_schema.erl

+ 1 - 2
apps/emqx/etc/emqx.conf

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

+ 7 - 4
apps/emqx/src/emqx_schema.erl

@@ -1415,7 +1415,10 @@ fields("sysmon_vm") ->
             sc(
                 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",
@@ -2113,12 +2116,12 @@ ref(Module, Field) -> hoconsc:ref(Module, Field).
 mk_duration(Desc, OverrideMeta) ->
     DefaultMeta = #{
         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"
             "- `s` for seconds,\n"
             "- `m` for minutes,\n"
-            "- `h` for hours;\n"
-            "or combined representation like `1h5m0s`"
+            "- `h` for hours;\n<br/>"
+            "or combination of whereof: `1h5m0s`"
     },
     hoconsc:mk(typerefl:alias("string", duration()), maps:merge(DefaultMeta, OverrideMeta)).