Correction to storage profiler write sample data size #5191 - #5192
Merged
joachimmetz merged 1 commit intoAug 2, 2026
Merged
Conversation
_WriteNewAttributeContainer rebound serialized_data to the compressed blob before the storage profiler sampled it, so the write_new samples reported the compressed length in both the data size and the compressed data size column. The value bound for the _data column now uses a separate name, leaving serialized_data holding the serialized container when the sample is taken. Adds a test that writes an event_data container through a real StorageProfiler and asserts the sampled data size exceeds the compressed data size. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5192 +/- ##
=======================================
Coverage 85.10% 85.10%
=======================================
Files 456 456
Lines 41089 41090 +1
=======================================
+ Hits 34967 34970 +3
+ Misses 6122 6120 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5191.
_WriteNewAttributeContainerreboundserialized_datato the compressed blob beforesampling it, so the storage profiler's
write_newsamples carried the compressedlength in both the
Data sizeand theCompressed data sizecolumn. The value boundfor the
_datacolumn is now a separate name, leavingserialized_dataholding theserialized container when the sample is taken.
compressed_datain the non-compressed branch is alsob""now, matching_CreateAttributeContainerFromRow.Storage file contents are unchanged — the compressed blob is still what is written to
the
_datacolumn, and the read path was already correct.tests/storage/sqlite/sqlite_file.pyhad no case that attached a storage profiler.testWriteNewAttributeContainerWithStorageProfilerwrites anevent_datacontainerthrough a real
StorageProfiler, reads back thestorage-*.csv.gzsample file, andasserts the data size exceeds the compressed data size. It fails on the parent commit
with
AssertionError: 89 not greater than 89.Verified: 57 tests in
tests/storage, 44 in the storage and profiler modules, and the30 CLI tool tests in
tests/cli/{psteal,psort,log2timeline}_tool.py.pylintandblackclean on both files. The one CLI failure,log2timeline_tool.testExtractEventsFromSourcesOnBDEImage, reproduces identically onthe unmodified parent commit and passes when run on its own — a local environment
issue, not related to this change.
Backward compatibility
None affected. The change is confined to which value the profiler samples; the stored
data, the storage format, and the profiler's CSV schema are all unchanged.