Skip to content
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

Add timers for bulk api's #1408

Merged
merged 7 commits into from
Dec 10, 2024
Merged

Conversation

kusumachalasani
Copy link
Contributor

@kusumachalasani kusumachalasani commented Dec 3, 2024

Description

Include timers to measure the timetaken for bulk api. This includes to measure the time taken

  • to gather metadata.
  • to create an experiment
  • to generate a recommendation
  • to run the complete job.
  • to retrieve job status when calling the api /bulk?job=<>
  • to create a bulk job when calling api /bulk

Fixes # (issue)

Type of change

  • Bug fix
  • [ X] New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Ran the bulk kruize demos to ensure the metrics are updated as expected. Also, included some manual bulk calls along with demo to ensure the metrics are updated proly with multiple bulk jobs.

  • New Test X
  • Functional testsuite

Test Configuration

  • Kubernetes clusters tested on:
    openshift

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

Include any additional information such as links, test results, screenshots here

@kusumachalasani kusumachalasani self-assigned this Dec 4, 2024
@rbadagandi1 rbadagandi1 added this to the Kruize 0.3 Release milestone Dec 4, 2024
@kusumachalasani kusumachalasani changed the base branch from master to mvp_demo December 5, 2024 08:35
@kusumachalasani
Copy link
Contributor Author

Metrics added are:

## Metrics for importMetadata
kruizeAPI_count{api="datasources",application="Kruize",method="importMetadata",status="success",} 1.0
kruizeAPI_sum{api="datasources",application="Kruize",method="importMetadata",status="success",} 6.055581306

## Metrics for bulk api 
kruizeAPI_count{api="bulk",application="Kruize",method="createBulkJob",status="success",} 1.0
kruizeAPI_count{api="bulk",application="Kruize",method="jobStatus",status="success",} 319.0
kruizeAPI_count{api="bulk",application="Kruize",method="getExperimentMap",status="success",} 1.0
kruizeAPI_count{api="bulk",application="Kruize",method="runBulkJob",status="success",} 1.0

kruizeAPI_sum{api="bulk",application="Kruize",method="createBulkJob",status="success",} 0.021006902
kruizeAPI_sum{api="bulk",application="Kruize",method="jobStatus",status="success",} 16.427286459
kruizeAPI_sum{api="bulk",application="Kruize",method="getExperimentMap",status="success",} 0.490153543
kruizeAPI_sum{api="bulk",application="Kruize",method="runBulkJob",status="success",} 3768.895746419

kruizeAPI_active_jobs_count{api="bulk",application="Kruize",method="runBulkJob",status="running",} 0.0

@kusumachalasani kusumachalasani marked this pull request as ready for review December 5, 2024 17:53
@dinogun
Copy link
Contributor

dinogun commented Dec 9, 2024

@kusumachalasani Please fix the conflict

Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
Signed-off-by: kusumachalasani <[email protected]>
@kusumachalasani
Copy link
Contributor Author

@kusumachalasani Please fix the conflict

Done.

Copy link
Contributor

@dinogun dinogun left a comment

Choose a reason for hiding this comment

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

LGTM

@dinogun dinogun merged commit db21f80 into kruize:mvp_demo Dec 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants