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

io.trino.verifier.VerifierQueryEvent Maven / Gradle / Ivy

There is a newer version: 458
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.trino.verifier;

import com.google.common.collect.ImmutableList;
import io.airlift.event.client.EventField;
import io.airlift.event.client.EventType;

import javax.annotation.concurrent.Immutable;

import java.util.List;

@Immutable
@EventType("VerifierQuery")
public class VerifierQueryEvent
{
    private final String suite;
    private final String runId;
    private final String source;
    private final String name;
    private final boolean failed;

    private final String testCatalog;
    private final String testSchema;
    private final List testSetupQueries;
    private final String testQuery;
    private final List testTeardownQueries;
    private final List testSetupQueryIds;
    private final String testQueryId;
    private final List testTeardownQueryIds;
    private final Double testCpuTimeSecs;
    private final Double testWallTimeSecs;

    private final String controlCatalog;
    private final String controlSchema;
    private final List controlSetupQueries;
    private final String controlQuery;
    private final List controlTeardownQueries;
    private final List controlSetupQueryIds;
    private final String controlQueryId;
    private final List controlTeardownQueryIds;
    private final Double controlCpuTimeSecs;
    private final Double controlWallTimeSecs;

    private final String errorMessage;

    public VerifierQueryEvent(
            String suite,
            String runId,
            String source,
            String name,
            boolean failed,
            String testCatalog,
            String testSchema,
            List testSetupQueries,
            String testQuery,
            List testTeardownQueries,
            List testSetupQueryIds,
            String testQueryId,
            List testTeardownQueryIds,
            Double testCpuTimeSecs,
            Double testWallTimeSecs,
            String controlCatalog,
            String controlSchema,
            List controlSetupQueries,
            String controlQuery,
            List controlTeardownQueries,
            List controlSetupQueryIds,
            String controlQueryId,
            List controlTeardownQueryIds,
            Double controlCpuTimeSecs,
            Double controlWallTimeSecs,
            String errorMessage)
    {
        this.suite = suite;
        this.runId = runId;
        this.source = source;
        this.name = name;
        this.failed = failed;

        this.testCatalog = testCatalog;
        this.testSchema = testSchema;
        this.testSetupQueries = ImmutableList.copyOf(testSetupQueries);
        this.testQuery = testQuery;
        this.testTeardownQueries = ImmutableList.copyOf(testTeardownQueries);
        this.testSetupQueryIds = ImmutableList.copyOf(testSetupQueryIds);
        this.testQueryId = testQueryId;
        this.testTeardownQueryIds = ImmutableList.copyOf(testTeardownQueryIds);
        this.testCpuTimeSecs = testCpuTimeSecs;
        this.testWallTimeSecs = testWallTimeSecs;

        this.controlCatalog = controlCatalog;
        this.controlSchema = controlSchema;
        this.controlSetupQueries = ImmutableList.copyOf(controlSetupQueries);
        this.controlQuery = controlQuery;
        this.controlTeardownQueries = ImmutableList.copyOf(controlTeardownQueries);
        this.controlSetupQueryIds = ImmutableList.copyOf(controlSetupQueryIds);
        this.controlQueryId = controlQueryId;
        this.controlTeardownQueryIds = ImmutableList.copyOf(controlTeardownQueryIds);
        this.controlCpuTimeSecs = controlCpuTimeSecs;
        this.controlWallTimeSecs = controlWallTimeSecs;

        this.errorMessage = errorMessage;
    }

    @EventField
    public String getSuite()
    {
        return suite;
    }

    @EventField
    public String getRunId()
    {
        return runId;
    }

    @EventField
    public String getSource()
    {
        return source;
    }

    @EventField
    public String getName()
    {
        return name;
    }

    @EventField
    public boolean isFailed()
    {
        return failed;
    }

    @EventField
    public String getTestCatalog()
    {
        return testCatalog;
    }

    @EventField
    public String getTestSchema()
    {
        return testSchema;
    }

    @EventField
    public String getTestQuery()
    {
        return testQuery;
    }

    @EventField
    public List getTestSetupQueryIds()
    {
        return testSetupQueryIds;
    }

    @EventField
    public String getTestQueryId()
    {
        return testQueryId;
    }

    @EventField
    public List getTestTeardownQueryIds()
    {
        return testTeardownQueryIds;
    }

    @EventField
    public Double getTestCpuTimeSecs()
    {
        return testCpuTimeSecs;
    }

    @EventField
    public Double getTestWallTimeSecs()
    {
        return testWallTimeSecs;
    }

    @EventField
    public String getControlCatalog()
    {
        return controlCatalog;
    }

    @EventField
    public String getControlSchema()
    {
        return controlSchema;
    }

    @EventField
    public String getControlQuery()
    {
        return controlQuery;
    }

    @EventField
    public List getControlSetupQueryIds()
    {
        return controlSetupQueryIds;
    }

    @EventField
    public String getControlQueryId()
    {
        return controlQueryId;
    }

    @EventField
    public List getControlTeardownQueryIds()
    {
        return controlTeardownQueryIds;
    }

    @EventField
    public Double getControlCpuTimeSecs()
    {
        return controlCpuTimeSecs;
    }

    @EventField
    public Double getControlWallTimeSecs()
    {
        return controlWallTimeSecs;
    }

    @EventField
    public String getErrorMessage()
    {
        return errorMessage;
    }

    @EventField
    public List getTestSetupQueries()
    {
        return testSetupQueries;
    }

    @EventField
    public List getTestTeardownQueries()
    {
        return testTeardownQueries;
    }

    @EventField
    public List getControlSetupQueries()
    {
        return controlSetupQueries;
    }

    @EventField
    public List getControlTeardownQueries()
    {
        return controlTeardownQueries;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy