1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-14 23:44:58 +02:00

storageFileRead() accepts a buffer for output rather than creating one.

This is more efficient overall and allows the caller to specify how many bytes will be read on each call. Reads are appended if the buffer already contains data but the buffer size will never increase.

Allow Buffer object "used size" to be different than "allocated size". Add functions to manage used size and remaining size and update automatically when possible.
This commit is contained in:
David Steele
2018-07-17 19:01:54 -04:00
parent 0acf705416
commit 5dc8a2ec08
17 changed files with 362 additions and 115 deletions

View File

@ -510,6 +510,10 @@ sub end
# Combine with prior run if there was one
if ($self->{oStorageTest}->exists($strLCovFile))
{
my $strCoverage = ${$self->{oStorageTest}->get($strLCovOutTmp)};
$strCoverage =~ s/^SF\:.*$/SF:$strModulePath\.c/mg;
$self->{oStorageTest}->put($strLCovOutTmp, $strCoverage);
executeTest(
'docker exec -i -u ' . TEST_USER . " ${strImage} " .
"${strLCovExe} --add-tracefile=${strLCovOutTmp} --add-tracefile=${strLCovFile} --o=${strLCovOutTmp}");