Skip to content

Use a dedicated option instead of MaxMetricSamplesPerPackage #3156

Closed
@codebien

Description

@codebien

What

As defined by the code's comment below, we should use a better name that matches the purpose for MaxMetricSamplesPerPackage in cloudv2.

cloudv2 uses MaxMetricSamplesPerPackage for defining the max number of time series in a single flush batch. Instead, the current option defines the number of k6 samples.

k6/cloudapi/config.go

Lines 34 to 36 in 1df72a0

// TODO: rename the config field to align to the new logic by time series
// when the migration from the version 1 is completed.
MaxMetricSamplesPerPackage null.Int `json:"maxMetricSamplesPerPackage" envconfig:"K6_CLOUD_MAX_METRIC_SAMPLES_PER_PACKAGE"`

// TODO: rename the config field to align to the new logic by time series
// when the migration from the version 1 is completed.
maxSeriesInSingleBatch: int(o.config.MaxMetricSamplesPerPackage.Int64),

Why

MaxMetricSamplesPerPackage is inherited from v1 but we should use a cleaner and dedicated field.

Suggestion

Add a dedicated new field for defining the max number of series in a single flush batch.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions