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>
Wed, 31 May 2023 21:07:07 +0000 (17:07 -0400)
commitac9d3ccb62eba8051559cad1d874268a1bebd57a
tree3953ec8d83eb24414e9440c7b9bb64f57924e45e
parentb4b790cd6754c0866af5fc785415690cb0280b30
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.025148 seconds and 4 git commands to generate.