All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.client.jdbc.core.CZJobMetric Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.client.jdbc.core;
import cz.proto.JobProfiling;
import lombok.Getter;
import lombok.Setter;

public class CZJobMetric {
    @Getter
    @Setter
    private long clientRequestMs;
    @Getter
    @Setter
    private long clientResponseMs;
    @Getter
    @Setter
    private long gatewayStartMs;
    @Getter
    @Setter
    private long gatewayEndMs;
    @Getter
    @Setter
    private long serverSubmitMs;
    @Getter
    @Setter
    private long serverStartMs;
    @Getter
    @Setter
    private long serverPlanMs;
    @Getter
    @Setter
    private long serverDagMs;
    @Getter
    @Setter
    private long serverResourceMs;
    @Getter
    @Setter
    private long serverEndMs;

    public CZJobMetric() {
    }

    public void fillServerJobProfiling(JobProfiling jobProfiling) {
        if (jobProfiling == null) {
            return;
        }
        for (JobProfiling.JobProfilingItem item : jobProfiling.getProfilingList()) {
            switch (item.getE()) {
                case 110:
                    this.serverPlanMs = item.getT();
                    break;
                case 112:
                    this.serverDagMs = item.getT();
                    break;
                case 120:
                    this.serverResourceMs = item.getT();
                    break;
                default:
                    break;
            }
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy