Enhance Load Generator to Query Pre-Generated Data Blocks#782
Enhance Load Generator to Query Pre-Generated Data Blocks#782kushalShukla-web wants to merge 7 commits intoprometheus:masterfrom
Conversation
…ed blocks. Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
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.
It needs to a bit of clean up.
6100f15 to
01a5662
Compare
…d loadgen start and end time! Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
b224f59 to
a053628
Compare
Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
a053628 to
2748652
Compare
Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
2. Replaced images to prominfra docker registery. Signed-off-by: Kushal Shukla <kushalshukla110@gmail.com>
tools/load-generator/main.go
Outdated
| return &bucketConfig, nil | ||
| } | ||
|
|
||
| func configstate(v *BucketConfig, err error) *configState { |
There was a problem hiding this comment.
It is potentially confusing to have two identifiers which differ only in the case of some letters.
| for { | ||
| start := time.Now() | ||
|
|
||
| runBlockMode := "current" |
There was a problem hiding this comment.
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.
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.
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 <kushalshukla110@gmail.com>
bb03968 to
8b752ef
Compare
|
same like PR #779 . |
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 !