From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Sergey Kaplun <skaplun@tarantool.org> Cc: Sergey Bronnikov <estetus@gmail.com>, tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH luajit][v1] sysprof: allow calling sysprof.report before stopping Date: Wed, 4 Jun 2025 16:31:14 +0300 [thread overview] Message-ID: <80c1d4a5-c987-470d-a088-a57ebcfe1033@tarantool.org> (raw) In-Reply-To: <aEBGfoBcS71MxvYa@root> [-- Attachment #1: Type: text/plain, Size: 1257 bytes --] Hello, Sergey, On 6/4/25 16:13, Sergey Kaplun wrote: <snipped> >>>> + interval = 1, >>>> + path = "/dev/null", >>>> +} >>>> +test:is(res, true, "res is correct") >>>> +test:is(err, nil, "no error") >>>> +test:is(errno, nil, "no errno") >>> 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 `test:is()` check, since we don't want to _test_ the starting of >>> the profiler only to _assert_ that the sysprof has been started. >>> >> last two checks were removed andtest:is() replaced with assert() > 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. Fixed. >>>> + >>>> +local report = misc.sysprof.report() >>>> +test:ok(report.samples == 0, "total number of samples is non-zero") >>> 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. >> Updated. > Side note: Checking the non-0 samples for default payload instead. > >>>> +misc.sysprof.stop() >>>> + >>> <snipped> >>> >>>> 2.43.0 >>>> [-- Attachment #2: Type: text/html, Size: 3030 bytes --]
next prev parent reply other threads:[~2025-06-04 13:31 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-05-16 12:38 Sergey Bronnikov via Tarantool-patches 2025-06-04 8:35 ` Sergey Kaplun via Tarantool-patches 2025-06-04 11:07 ` Sergey Bronnikov via Tarantool-patches 2025-06-04 13:13 ` Sergey Kaplun via Tarantool-patches 2025-06-04 13:31 ` Sergey Bronnikov via Tarantool-patches [this message] 2025-06-04 8:36 ` Sergey Kaplun via Tarantool-patches 2025-06-04 11:19 ` Sergey Bronnikov via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=80c1d4a5-c987-470d-a088-a57ebcfe1033@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=estetus@gmail.com \ --cc=sergeyb@tarantool.org \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit][v1] sysprof: allow calling sysprof.report before stopping' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox