Tests: Test snapshot maximum size correctly
authorOlivier Dion <odion@efficios.com>
Wed, 1 Feb 2023 22:11:02 +0000 (17:11 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Feb 2023 21:21:26 +0000 (16:21 -0500)
commitd34e7a4dfdcaf390f17cf602d9b6e520bf9f18bc
tree9b2a792acb915466836a99b60b57ea94b118a6b9
parent198b841770f31d35afe1e50ff52e41e7599759e3
Tests: Test snapshot maximum size correctly

The minimum size for a channel is determined by:

  sub-buffer-size * sub-buffer-count * possible-cpus

where sub-buffer-size is the system page size and sub-buffer-count is 2.

We set a snapshot with a maximum size of the minimum size. From there,
we need to spam that amount of events, assuming each event to be one
byte, on every online CPUs. We can then ensure that the total snapshot's
size is equal to the minimum size for a channel. However, there's a
little bias if the number of possible cores is greater than the number
of online cores. In that case, the bias is one sub-buffer for each extra
ring buffer.

Change-Id: I4718e134684463789b4f7be9b12c9bf3d6cfec20
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/snapshots/ust_test
This page took 0.025157 seconds and 4 git commands to generate.