Skip to content

Conversation

@JasonXuDeveloper
Copy link
Contributor

Add Specs []LoadProfileSpec field alongside existing Spec field to enable time-series replay support in future. Update all code to use GetSpecs() accessor method for unified access to both old and new formats.

Changes:

  • Add Specs field with omitempty tags to LoadProfile struct
  • Add GetSpecs() method to handle both single Spec and Specs formats
  • Update LoadProfile.Validate() to validate all specs
  • Update runner, runkperf bench, and warmup commands to use GetSpecs()
  • Maintain backward compatibility with existing configs

All existing configs with 'spec:' continue to work unchanged. New configs can use 'specs:' array format. No functional changes in this commit.

@xinWeiWei24 xinWeiWei24 self-requested a review December 17, 2025 00:10
Add Specs []LoadProfileSpec field alongside existing Spec field to enable
time-series replay support in future. Update all code to use GetSpecs()
accessor method for unified access to both old and new formats.

Changes:
- Add Specs field with omitempty tags to LoadProfile struct
- Add GetSpecs() method to handle both single Spec and Specs formats
- Update LoadProfile.Validate() to validate all specs
- Update runner, runkperf bench, and warmup commands to use GetSpecs()
- Maintain backward compatibility with existing configs

All existing configs with 'spec:' continue to work unchanged. New configs
can use 'specs:' array format. No functional changes in this commit.
// Spec defines behavior of load profile (deprecated, use Specs for single or multiple specs).
Spec LoadProfileSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
// Specs defines behaviors of load profile for time-series replay support.
Specs []LoadProfileSpec `json:"specs,omitempty" yaml:"specs,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

coulc you please explain it more here? Why not just replace existing Spec?

Copy link
Collaborator

Choose a reason for hiding this comment

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

it's not GA yet. so I don't think we should consider deprecation right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

coulc you please explain it more here? Why not just replace existing Spec?

for backward compatibility we may expect legacy configs still using spec field and hence we need to keep it. if we dont bother backward compatibility on existing configs (and we want to migrate them) then we can simply replace the existing Spec

Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't upgrade binary during that testcase. so just replace it with new specs and provide more detail about new one spec. thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be resolved

Convert single Spec field to Specs array for time-series replay support.
This is a breaking change that removes backward compatibility as the
feature is not yet GA.

Changes:
- Update LoadProfile struct to use Specs []LoadProfileSpec
- Remove backward compatibility code (GetSpecs/SetFirstSpec methods)
- Update all code references to use .Specs[0] direct access
- Convert all YAML configs from spec: to specs: list format
- Update tests to match new structure

All builds pass and tests verified.
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.

3 participants