Skip to content

Refactor Loader.go, in preparation for adding new trace type.#740

Merged
leokondrashov merged 8 commits intovhive-serverless:mainfrom
16fb:main
Apr 15, 2026
Merged

Refactor Loader.go, in preparation for adding new trace type.#740
leokondrashov merged 8 commits intovhive-serverless:mainfrom
16fb:main

Conversation

@16fb
Copy link
Copy Markdown
Collaborator

@16fb 16fb commented Mar 3, 2026

Summary

Refactored Loader.
Ensure more clear separation of function parsing/generation, dirigent reading, driver running.

Implementation Notes ⚒️

Added traceInputType variable classification
Combined runRPS() and runTrace() into singular runMode()

Driver should use []*common.function directly, extracted function generation out of driver.
Driver should not handle function read/write to file, extract out of driver.

Dirigent metadata adding extracted out of function generation, takes a dedicated section of runMode()
RPS function generation rewritten to extract dirigent metadata adding out.

External Dependencies 🍀

N/A

Breaking API Changes ⚠️

trace_driver_test had to be updated to use new function specification generation method.
driver.GenerateSpecification() => GenerateAzure2019Specification()

Comment thread pkg/driver/trace_driver.go Outdated
Comment thread pkg/generator/rps.go Outdated
Comment thread cmd/loader.go Outdated
Comment thread cmd/loader.go Outdated
@16fb
Copy link
Copy Markdown
Collaborator Author

16fb commented Mar 5, 2026

Previous 2 commits added your pointers to the PR
The 3 commits before that, fixed the PR automated test popups

Copy link
Copy Markdown
Contributor

@leokondrashov leokondrashov left a comment

Choose a reason for hiding this comment

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

Quite good now, please fix minor comments and ready to merge

Comment thread cmd/loader.go Outdated
Comment thread cmd/loader.go
Comment thread cmd/loader.go Outdated
Comment thread pkg/generator/rps.go Outdated
Comment thread pkg/generator/rps.go Outdated
Copy link
Copy Markdown
Contributor

@leokondrashov leokondrashov left a comment

Choose a reason for hiding this comment

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

Looks good. Need to rebase on the new main, shouldn't be a problem since the update was only with the k8s setup, without touching the loader code

16fb added 8 commits April 14, 2026 18:25
Deprecates GenerateSpecification(), ReadOrWriteFileSpecification() outputIATsToFile()
Replaced with GenerateAzure2019Specification(), ReadOrWriteSpecificationToFile()

Signed-off-by: Bryan Wong <wongwenpingbryan@gmail.com>
Requires each inputType's generator to return a standardised []*common.Function. Vswarn and Dirigent settings left to generator to handle.

Signed-off-by: Bryan Wong <wongwenpingbryan@gmail.com>
Decomponsed RPS function generation (CreateRPSFunctions())
into function creation, and adding dirigent metadata to function.

Extract Dirigent out of GenerateFunction().
Own dedicated section in runMode().

Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
Update trace_driver test to work with updated function_specification generation.

Removed unused, deprecated functions.

Added back "FailureConfiguration:" property which was wrongly removed.

Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
For functions:
  generator.GenerateAzure2019Specification(),
  generator.AppendDirigentMetadata().
Fixed function references,
and to expect []*function to be updated when passed to func.

Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
Remove shiftIAT and IATDistribution from loader configuration.
Updated driver_tests to not reference the loader struct,
reference the shiftIAT and IATDistribution directly.

Filled up missing fields for loader creation in RunMode().

Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
Signed-off-by: Bryan Wong wongwenpingbryan@gmail.com
@16fb
Copy link
Copy Markdown
Collaborator Author

16fb commented Apr 14, 2026

Yeap, have rebased on new main

@leokondrashov leokondrashov merged commit 0512e9e into vhive-serverless:main Apr 15, 2026
15 of 18 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