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

Enhance Load Generator to Query Pre-Generated Data Blocks #782

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kushalShukla-web
Copy link
Contributor

@kushalShukla-web kushalShukla-web commented Nov 11, 2024

changed Load generator to query from downloaded blocks. Here i have added "current" and "absolute" time to query data between current data (head_blocks) and absolute data (Downloaded) blocks.
Things left - i have to configure to add instant query on downloaded blocks !

@kushalShukla-web kushalShukla-web changed the title changed Load-generator to query in downloaded blocks. Enhance Load Generator to Query Pre-Generated Data Blocks in Prometheus. Nov 12, 2024
@kushalShukla-web
Copy link
Contributor Author

Instant query is still missing; currently, it does not perform instant queries on downloaded blocks.

@kakkoyun kakkoyun changed the title Enhance Load Generator to Query Pre-Generated Data Blocks in Prometheus. Enhance Load Generator to Query Pre-Generated Data Blocks Nov 13, 2024
@kakkoyun kakkoyun marked this pull request as draft November 13, 2024 11:31
defer resp.Body.Close()

// Print the body content as a string
fmt.Println(string(body), "Hi from body side!!!")
Copy link
Member

Choose a reason for hiding this comment

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

It needs to a bit of clean up.

…d loadgen

start and end time!
Signed-off-by: Kushal Shukla <[email protected]>
2. Replaced images to prominfra docker registery.
Signed-off-by: Kushal Shukla <[email protected]>
@kushalShukla-web kushalShukla-web marked this pull request as ready for review November 25, 2024 19:11
return &bucketConfig, nil
}

func configstate(v *BucketConfig, err error) *configState {
Copy link
Member

Choose a reason for hiding this comment

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

It is potentially confusing to have two identifiers which differ only in the case of some letters.

defer wg.Done()
fmt.Printf("Running querier %s %s for %s\n", q.target, q.name, q.url)
time.Sleep(20 * time.Second)

for {
start := time.Now()

runBlockMode := "current"
Copy link
Member

Choose a reason for hiding this comment

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

I think the idea here is to alternate between current and absolute?
At least, put a comment saying that.

}
return &configState{
bucketConfig: v,
Err: err,
Copy link
Member

Choose a reason for hiding this comment

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

I think the idea is we carry err around, and act like this config doesn't exist if err is non-nil.

This at least deserves a comment. Maybe an alternative would work, just having nil for this configState object, if there would be an error, and checking that?

func (q *Querier) run(wg *sync.WaitGroup) {
// Function to load `minTime` and `maxTime` from bucket-config.yml
func loadKeyConfig() (*BucketConfig, error) {
filePath := "/config/bucket-config.yml"
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be a parameter, a CLI flag.

2. Removed Err and absoluteTime from the configState object.
3. Added flag package for debugging purpose and removed hard coded file path.

Signed-off-by: Kushal Shukla <[email protected]>
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