<!DOCTYPE html>
<html data-lt-installed="true">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="padding-bottom: 1px;">
    <p>Hello, Sergey,<br>
    </p>
    <div class="moz-cite-prefix">On 6/4/25 16:13, Sergey Kaplun wrote:<br>
    </div>
    <p><br>
    </p>
    <p><snipped><br>
    </p>
    <blockquote type="cite" cite="mid:aEBGfoBcS71MxvYa@root">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="" class="moz-quote-pre">
</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+    interval = 1,
+    path = "/dev/null",
+}
+test:is(res, true, "res is correct")
+test:is(err, nil, "no error")
+test:is(errno, nil, "no errno")
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">I suppose that 2 last checks are excess. The first one is enough to be
sure that the profiler is started. Also, we may use `assert()` here
instead of `<a class="moz-txt-link-freetext" href="test:is()">test:is()</a>` check, since we don't want to _test_ the starting of
the profiler only to _assert_ that the sysprof has been started.

</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">last two checks were removed and <a class="moz-txt-link-freetext" href="test:is()">test:is()</a> replaced with assert()
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
I would rather use
| assert(misc.sysprof.start({...})
and
| assert(misc.sysprof.stop())
instead, for simplicity and to avoid the irrelevant local variables.

Feel free to ignore.
</pre>
    </blockquote>
    Fixed.<br>
    <blockquote type="cite" cite="mid:aEBGfoBcS71MxvYa@root">
      <pre wrap="" class="moz-quote-pre">
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+
+local report = misc.sysprof.report()
+test:ok(report.samples == 0, "total number of samples is non-zero")
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre">I'm not sure that this will always be true (for example, in coverage
workflow). I suggest increasing the interval dramatically to avoid false
positives here.
</pre>
        </blockquote>
        <pre wrap="" class="moz-quote-pre">Updated.
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
Side note: Checking the non-0 samples for default payload instead.

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">+misc.sysprof.stop()
+
</pre>
          </blockquote>
          <pre wrap="" class="moz-quote-pre"><snipped>

</pre>
          <blockquote type="cite">
            <pre wrap="" class="moz-quote-pre">2.43.0

</pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
</pre>
    </blockquote>
  </body>
  <lt-container></lt-container>
</html>