Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK] Added reserve for spans array in BatchSpanProcessor. (#2724)
* Added reserve for spans array in BatchSpanProcessor. Added reserve for spans array in BatchSpanProcessor. Helps to allocate the amount of memory needed for number of records so that dynamic memory allocation doesn't happen in the consume method. .push_back() reallocates memory each time the method is called. Using .reserve() would avoid memory reallocation as already the memory is allocated. References: https://cplusplus.com/reference/vector/vector/push_back/ https://cplusplus.com/reference/vector/vector/reserve/ * Added reserve for spans array in BatchLogProcessor. Added reserve for spans array in BatchLogProcessor. Same as previously done for BatchSpanProcessor * Update batch_log_record_processor.cc * Update batch_span_processor.cc * Update sdk/src/logs/batch_log_record_processor.cc
- Loading branch information