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

fix: workload and workload_volume templates should invoke the instance task before the data task #3498

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions cmd/collectors/restperf/restperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -1519,18 +1519,19 @@ func (r *RestPerf) PollInstance() (map[string]*matrix.Matrix, error) {
records []gjson.Result
)

dataQuery := path.Join(r.Prop.Query, "rows")
fields := "properties"
// The PollInstance method is only needed for `workload` and `workload_detail` objects.
if !(isWorkloadObject(r.Prop.Query) || isWorkloadDetailObject(r.Prop.Query)) {
return nil, nil
}

var filter []string

if isWorkloadObject(r.Prop.Query) || isWorkloadDetailObject(r.Prop.Query) {
fields = "*"
dataQuery = qosWorkloadQuery
if r.Prop.Query == qosVolumeQuery || r.Prop.Query == qosDetailVolumeQuery {
filter = append(filter, "workload_class="+r.loadWorkloadClassQuery(objWorkloadVolumeClass))
} else {
filter = append(filter, "workload_class="+r.loadWorkloadClassQuery(objWorkloadClass))
}
fields := "*"
dataQuery := qosWorkloadQuery
if r.Prop.Query == qosVolumeQuery || r.Prop.Query == qosDetailVolumeQuery {
filter = append(filter, "workload_class="+r.loadWorkloadClassQuery(objWorkloadVolumeClass))
} else {
filter = append(filter, "workload_class="+r.loadWorkloadClassQuery(objWorkloadClass))
}

r.pollInstanceCalls++
Expand Down
2 changes: 1 addition & 1 deletion conf/restperf/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ collector: RestPerf
# Order here matters!
schedule:
- counter: 24h
- instance: 720h # The instance schedule is only used by the `workload` and `workload_volume` templates
- data: 1m

objects:
Expand Down Expand Up @@ -55,6 +56,5 @@ objects:
Vscan: vscan.yaml
VscanSVM: vscan_svm.yaml

# Uncomment to collect workload/QOS counters.
Workload: workload.yaml
WorkloadVolume: workload_volume.yaml
1 change: 0 additions & 1 deletion conf/zapiperf/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ objects:
Vscan: vscan.yaml
VscanSVM: vscan_svm.yaml

# Uncomment to collect workload/QOS counters.
Workload: workload.yaml
WorkloadVolume: workload_volume.yaml
Loading