kunit: string-stream: Test performance of string_stream
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 28 Aug 2023 10:41:11 +0000 (11:41 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 18 Sep 2023 16:45:59 +0000 (10:45 -0600)
commit53568b720c4dfb70d8db3da3587120fd0c378cae
tree911f591617b4fcce4aa30c047da04918c00c4054
parent05e2006ce493cb6fb5e5b4b8317f82754dfa2b1e
kunit: string-stream: Test performance of string_stream

Add a test of the speed and memory use of string_stream.

string_stream_performance_test() doesn't actually "test" anything (it
cannot fail unless the system has run out of allocatable memory) but it
measures the speed and memory consumption of the string_stream and reports
the result.

This allows changes in the string_stream implementation to be compared.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/string-stream-test.c