| 2863 | } |
| 2864 | |
| 2865 | std::pair<int64_t, double> doDeltaWriteBench(const Standalone<GranuleDeltas>& data, |
| 2866 | const KeyRangeRef& fileRange, |
| 2867 | bool chunked, |
| 2868 | Optional<BlobGranuleCipherKeysCtx> cipherKeys, |
| 2869 | Optional<CompressionFilter> compressionFilter) { |
| 2870 | Standalone<StringRef> fileNameRef = StringRef(); |
| 2871 | int64_t serializedBytes = 0; |
| 2872 | double elapsed = -timer_monotonic(); |
| 2873 | for (int runI = 0; runI < WRITE_RUNS; runI++) { |
| 2874 | if (!chunked) { |
| 2875 | serializedBytes = ObjectWriter::toValue(data, Unversioned()).size(); |
| 2876 | } else { |
| 2877 | serializedBytes = |
| 2878 | serializeChunkedDeltaFile(fileNameRef, data, fileRange, 32 * 1024, compressionFilter, cipherKeys) |
| 2879 | .size(); |
| 2880 | } |
| 2881 | } |
| 2882 | elapsed += timer_monotonic(); |
| 2883 | elapsed /= WRITE_RUNS; |
| 2884 | return { serializedBytes, elapsed }; |
| 2885 | } |
| 2886 | |
| 2887 | FileSet rewriteChunkedFileSet(const FileSet& fileSet, |
| 2888 | Optional<BlobGranuleCipherKeysCtx> keys, |
no test coverage detected