Skip to content

Conversation

@v0y4g3r
Copy link
Contributor

@v0y4g3r v0y4g3r commented Sep 25, 2025

  • Refactor Label Structure: Updated the label structure from Label to LabelCandidates in sample_generator.go, sample_loader.go, permutation.go, and permutation_test.go to better represent label candidates.
  • Optimize Time Series Generation: Introduced streaming and goroutine-based time series generation in sample_loader.go to improve performance and scalability.
  • Add Unit Tests: Created sample_loader_test.go to test the new TagSetPermutationStream function, ensuring correct permutations of label candidates.

 - **Refactor Label Structure**: Updated the label structure from `Label` to `LabelCandidates` in `sample_generator.go`, `sample_loader.go`, `permutation.go`, and `permutation_test.go` to better represent label candidates.
 - **Optimize Time Series Generation**: Introduced streaming and goroutine-based time series generation in `sample_loader.go` to improve performance and scalability.
 - **Add Unit Tests**: Created `sample_loader_test.go` to test the new `TagSetPermutationStream` function, ensuring correct permutations of label candidates.

Signed-off-by: Lei, HUANG <[email protected]>
 Add database label support to `SampleLoader`

 - Introduced a new `Database` field in `SampleLoader` to store the database name.
 - Updated `run` method in `sample_loader.go` to retrieve the database name from command-line flags.
 - Modified `convertMetricToTimeSeries` and `generateTimeSeriesForFileConfig` methods to append the database name as a label to time series if specified.
 - Added a new command-line flag `--database` to specify the database name in `NewCommand`.

Signed-off-by: Lei, HUANG <[email protected]>
 Add database label support to `SampleLoader`

 - Introduced a new `Database` field in `SampleLoader` to store the database name.
 - Updated `run` method in `sample_loader.go` to retrieve the database name from command-line flags.
 - Modified `convertMetricToTimeSeries` and `generateTimeSeriesForFileConfig` methods to append the database name as a label to time series if specified.
 - Added a new command-line flag `--database` to specify the database name in `NewCommand`.

Signed-off-by: Lei, HUANG <[email protected]>
 - **Enhancements in `sample_loader.go`:**
   - Added logging for the number of series in each request sent by the worker.

 - **Updates in `distribution.go`:**
   - Introduced `NumCandidates` method to `LabelGenerator` interface and implemented it in `ConstantString` and `WeightedPreset` types.

 - **Improvements in `parse.go`:**
   - Added logging for the number of series parsed from each YAML file and the total series count.
   - Changed variable `name` to `metricName` for clarity.

Signed-off-by: Lei, HUANG <[email protected]>
@WenyXu WenyXu merged commit 9f584b0 into WenyXu:main Oct 15, 2025
3 checks passed
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