From 575458578aa69c52e2c4ac5eb6ac5cfb8e390c29 Mon Sep 17 00:00:00 2001 From: rahulguptajss Date: Fri, 28 Feb 2025 11:32:30 +0530 Subject: [PATCH 1/2] fix: workload and workload_volume templates should invoke the instance task before the data task --- cmd/collectors/restperf/restperf.go | 21 +++++++++++---------- conf/restperf/default.yaml | 2 +- conf/zapiperf/default.yaml | 1 - 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/collectors/restperf/restperf.go b/cmd/collectors/restperf/restperf.go index 0c5a41236..cd8899d15 100644 --- a/cmd/collectors/restperf/restperf.go +++ b/cmd/collectors/restperf/restperf.go @@ -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++ diff --git a/conf/restperf/default.yaml b/conf/restperf/default.yaml index 8bea78c9f..7d156f850 100644 --- a/conf/restperf/default.yaml +++ b/conf/restperf/default.yaml @@ -4,6 +4,7 @@ collector: RestPerf # Order here matters! schedule: - counter: 24h + - instance: 720h # This is only needed for `workload` and `workload_volume` templates, which overwrite this value in their own templates. - data: 1m objects: @@ -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 diff --git a/conf/zapiperf/default.yaml b/conf/zapiperf/default.yaml index f476b5b28..61e22ebca 100644 --- a/conf/zapiperf/default.yaml +++ b/conf/zapiperf/default.yaml @@ -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 From 7eb53d242105d4ff1830a88753db4de3b93e5a5e Mon Sep 17 00:00:00 2001 From: rahulguptajss Date: Fri, 28 Feb 2025 19:32:50 +0530 Subject: [PATCH 2/2] fix: workload and workload_volume templates should invoke the instance task before the data task --- conf/restperf/default.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/restperf/default.yaml b/conf/restperf/default.yaml index 7d156f850..df078140f 100644 --- a/conf/restperf/default.yaml +++ b/conf/restperf/default.yaml @@ -4,7 +4,7 @@ collector: RestPerf # Order here matters! schedule: - counter: 24h - - instance: 720h # This is only needed for `workload` and `workload_volume` templates, which overwrite this value in their own templates. + - instance: 720h # The instance schedule is only used by the `workload` and `workload_volume` templates - data: 1m objects: