-
Notifications
You must be signed in to change notification settings - Fork 69
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
base: master
Are you sure you want to change the base?
Conversation
…ed blocks. Signed-off-by: Kushal Shukla <[email protected]>
d3ec226
to
fe9cad2
Compare
Instant query is still missing; currently, it does not perform instant queries on downloaded blocks. |
6976d42
to
6100f15
Compare
tools/load-generator/main.go
Outdated
defer resp.Body.Close() | ||
|
||
// Print the body content as a string | ||
fmt.Println(string(body), "Hi from body side!!!") |
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 needs to a bit of clean up.
6100f15
to
01a5662
Compare
…d loadgen start and end time! Signed-off-by: Kushal Shukla <[email protected]>
b224f59
to
a053628
Compare
Signed-off-by: Kushal Shukla <[email protected]>
a053628
to
2748652
Compare
Signed-off-by: Kushal Shukla <[email protected]>
2. Replaced images to prominfra docker registery. Signed-off-by: Kushal Shukla <[email protected]>
tools/load-generator/main.go
Outdated
return &bucketConfig, nil | ||
} | ||
|
||
func configstate(v *BucketConfig, err error) *configState { |
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 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" |
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 think the idea here is to alternate between current and absolute?
At least, put a comment saying that.
tools/load-generator/main.go
Outdated
} | ||
return &configState{ | ||
bucketConfig: v, | ||
Err: err, |
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 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?
tools/load-generator/main.go
Outdated
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" |
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 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]>
bb03968
to
8b752ef
Compare
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 !