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

RUM-8855 Increase Batch Processing Levels #2215

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

maxep
Copy link
Member

@maxep maxep commented Mar 3, 2025

What and why?

Increase batch processing levels.

More context in RFC (internal)

How?

/// Defines the maximum amount of batches processed sequentially without a delay within one reading/uploading cycle.
public enum BatchProcessingLevel {
    case low
    case medium
    case high

    var maxBatchesPerUpload: Int {
        switch self {
        case .low:
            return 5
        case .medium:
            return 20
        case .high:
            return 100
        }
    }
}

I took the opportunity to add the maxBatchesPerUpload to the UploadPerformancePreset protocol, which could be used for overrides.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs (see our guidelines [internal]) and run make api-surface)

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 3, 2025

Datadog Report

Branch report: maxep/RUM-8855/increase-batch-processing-level
Commit report: e82973c
Test service: dd-sdk-ios

✅ 0 Failed, 1088 Passed, 2728 Skipped, 1m 3.28s Total duration (1m 33.68s time saved)

@maxep maxep force-pushed the maxep/RUM-8855/increase-batch-processing-level branch from ae655d9 to e82973c Compare March 3, 2025 17:10
@maxep maxep marked this pull request as ready for review March 3, 2025 17:46
@maxep maxep requested review from a team as code owners March 3, 2025 17:46
Copy link
Member

@ncreated ncreated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯

@@ -65,13 +65,15 @@ internal struct PerformancePreset: Equatable, StoragePerformancePreset, UploadPe
let minUploadDelay: TimeInterval
let maxUploadDelay: TimeInterval
let uploadDelayChangeRate: Double
let maxBatchesPerUpload: Int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👍 It should have belong here since introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants