object-introspection/include/oi
Jake Hillion 71e734b120 tbv2: calculate total memory footprint
Add the option to calculate total size (inclusive size) by wrapping the
existing iterator. This change provides a new iterator, `SizedIterator`, which
wraps an existing iterator and adds a new field `size` to the output element.

This is achieved with a two pass algorithm on the existing iterator:
1. Gather metadata for each element. This includes the total size up until that
   element and the range of elements that should be included in the size.
2. Return the result from the underlying iterator with the additional
   field.

This algorithm is `O(N)` time on the number of elements in the iterator and
`O(N)` time, storing 16 bytes per element. This isn't super expensive but is a
lot more than the current algorithm which requires close to constant space.
Because of this I've implemented it as a wrapper on the iterator rather than on
by default, though it is now on in every one of our integration test cases.

Test plan:
- Added to the integration tests for full coverage.
2024-01-04 09:21:35 +00:00
..
exporters tbv2: calculate total memory footprint 2024-01-04 09:21:35 +00:00
result tbv2: calculate total memory footprint 2024-01-04 09:21:35 +00:00
types static types: add consume function similar to delegate 2023-09-15 14:43:09 +01:00
IntrospectionResult-inl.h tbv2: improve equality for iterator 2023-10-25 17:05:42 +01:00
IntrospectionResult.h capture_keys: store dynamic type path components more efficiently 2023-12-14 16:05:33 +00:00
oi-jit-inl.h oil v2 2023-08-23 15:59:53 +01:00
oi-jit.h support 0 to many config files (#371) 2023-10-02 14:06:39 -06:00
oi.h oil: make AoT introspect noinline 2023-10-25 13:23:47 +01:00