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>
Tue, 6 Jun 2023 18:39:02 +0000 (14:39 -0400)
commit4e3023535a43d306f3c9892dbaebe7adecb10021
treec43571e6f0ec562efdbce3f1928ede0df93f6125
parent9ff8f3ca6e45f1e083a7cb87605ce00b7b4e3008
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.025264 seconds and 4 git commands to generate.