-
Notifications
You must be signed in to change notification settings - Fork 210
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
test: configure pipeline to run scale test and publish data to app insights #1014
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alex Castilio dos Santos <[email protected]>
7135f75
to
0466961
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments, looks great overall!
return nil | ||
} | ||
|
||
type metric map[string]string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metric would be numerical values no? wouldn't it be better to enforce that with something like map[string]float64
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's map[string]string
because TrackEvent
method takes that type as input
require.NotEmpty(t, os.Getenv("APP_INSIGHTS_KEY")) | ||
|
||
opt.LabelsToGetMetrics = map[string]string{"k8s-app": "retina"} | ||
|
||
// CreateTestInfra | ||
createTestInfra := types.NewRunner(t, jobs.CreateTestInfra(subID, rg, clusterName, location, kubeConfigFilePath, *createInfra)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it feasible to create and delete clusters for scale tests during test runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is not yet agreed. Right now this pipeline execution is not automatically triggered by any event, only manual execution, so a cluster can be provided to run the test.
I will delete Cluster creation for now to avoid any confusion since this is not being used.
|
||
func (g *GetAndPublishMetrics) Prevalidate() error { | ||
if g.AppInsightsKey == "" { | ||
return fmt.Errorf("AppInsightsKey is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have the possibility to just log the metrics if the key not present for local test/run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think just logging it would be a good approach as there are many other log messages that would hide this data and make it useless, but optionally output these metrics to a file could be useful. I'll add that.
514a449
to
bf6e4a4
Compare
Signed-off-by: Alex Castilio dos Santos <[email protected]>
bf6e4a4
to
97d1ca3
Compare
Description
Configure pipeline to run scale test and publish data to app insights.
Data published:
timestamp, pod, podCpuInMilliCore, PodMemoryInMB, PodRestarts, node, nodeCpuInMilliCore, nodeMemoryInMB, retinaVersion, clusterName
Related Issue
If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.