Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Added reserve for spans array in BatchSpanProcessor. #2724

Merged
merged 6 commits into from
Jun 27, 2024

Commits on Jun 27, 2024

  1. 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/
    msiddhu authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    2d120cc View commit details
    Browse the repository at this point in the history
  2. Update sdk/src/trace/batch_span_processor.cc

    Co-authored-by: Marc Alff <marc.alff@free.fr>
    msiddhu and marcalff authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    dbcc4a7 View commit details
    Browse the repository at this point in the history
  3. Added reserve for spans array in BatchLogProcessor.

    Added reserve for spans array in BatchLogProcessor. Same as previously done for BatchSpanProcessor
    msiddhu authored Jun 27, 2024
    Configuration menu
    Copy the full SHA
    f91df52 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b6ec481 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f36f8a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    17aeaba View commit details
    Browse the repository at this point in the history