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

feat: Harvest should remove Service Center metrics #3019

Merged
merged 2 commits into from
Jul 1, 2024
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
6 changes: 5 additions & 1 deletion cmd/collectors/restperf/restperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var qosDetailQuery = "api/cluster/counter/tables/qos_detail"
var qosDetailVolumeQuery = "api/cluster/counter/tables/qos_detail_volume"
var qosWorkloadQuery = "api/storage/qos/workloads"

var workloadDetailMetrics = []string{"resource_latency", "service_time_latency"}
var workloadDetailMetrics = []string{"resource_latency"}

var qosQueries = map[string]string{
qosQuery: qosQuery,
Expand Down Expand Up @@ -171,6 +171,10 @@ func (r *RestPerf) InitQOS() error {
if withConstituents == "false" {
r.perfProp.disableConstituents = true
}
withServiceLatency := refine.GetChildContentS("with_service_latency")
if withServiceLatency != "false" {
workloadDetailMetrics = append(workloadDetailMetrics, "service_time_latency")
}
}
}
return nil
Expand Down
17 changes: 16 additions & 1 deletion cmd/collectors/zapiperf/zapiperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const (
BILLION = 1_000_000_000
)

var workloadDetailMetrics = []string{"resource_latency", "service_time_latency"}
var workloadDetailMetrics = []string{"resource_latency"}

type ZapiPerf struct {
*zapi.Zapi // provides: AbstractCollector, Client, Object, Query, TemplateFn, TemplateType
Expand Down Expand Up @@ -119,10 +119,25 @@ func (z *ZapiPerf) Init(a *collector.AbstractCollector) error {
return err
}

z.InitQOS()

z.Logger.Debug().Msg("initialized")
return nil
}

func (z *ZapiPerf) InitQOS() {
counters := z.Params.GetChildS("counters")
if counters != nil {
refine := counters.GetChildS("refine")
if refine != nil {
withServiceLatency := refine.GetChildContentS("with_service_latency")
if withServiceLatency != "false" {
workloadDetailMetrics = append(workloadDetailMetrics, "service_time_latency")
}
}
}
}

func (z *ZapiPerf) LoadPlugin(kind string, abc *plugin.AbstractPlugin) plugin.Plugin {
switch kind {
case "Nic":
Expand Down
1 change: 1 addition & 0 deletions conf/restperf/9.12.0/workload_detail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ counters:
- wait_time
- refine:
- with_constituents: false # The possible values are true or false. Setting this to true will include constituents in the results, while false will exclude them.
- with_service_latency: false # The possible values are true or false. Setting this to true will generate metric qos_detail_service_time_latency which is average service time for workload within the subsystems. This latency is the processing time within the subsystem.

resource_map:
CPU_dblade: backend
Expand Down
1 change: 1 addition & 0 deletions conf/restperf/9.12.0/workload_detail_volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ counters:
- wait_time
- refine:
- with_constituents: false # The possible values are true or false. Setting this to true will include constituents in the results, while false will exclude them.
- with_service_latency: false # The possible values are true or false. Setting this to true will generate metric qos_detail_service_time_latency which is average service time for workload within the subsystems. This latency is the processing time within the subsystem.

resource_map:
CPU_dblade : backend
Expand Down
1 change: 1 addition & 0 deletions conf/zapiperf/cdot/9.8.0/workload_detail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ counters:
- wait_time
- refine:
- with_constituents: false # The possible values are true or false. Setting this to true will include constituents in the results, while false will exclude them.
- with_service_latency: false # The possible values are true or false. Setting this to true will generate metric qos_detail_service_time_latency which is average service time for workload within the subsystems. This latency is the processing time within the subsystem.

resource_map:
CPU_dblade: backend
Expand Down
1 change: 1 addition & 0 deletions conf/zapiperf/cdot/9.8.0/workload_detail_volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ counters:
- wait_time
- refine:
- with_constituents: false # The possible values are true or false. Setting this to true will include constituents in the results, while false will exclude them.
- with_service_latency: false # The possible values are true or false. Setting this to true will generate metric qos_detail_service_time_latency which is average service time for workload within the subsystems. This latency is the processing time within the subsystem.

resource_map:
CPU_dblade : backend
Expand Down
Loading