# Copyright 2019 The Knative Authors
#
# 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
#
#     https://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.

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-mako

data:
  _example: |
    ################################
    #                              #
    #    EXAMPLE CONFIGURATION     #
    #                              #
    ################################

    # This block is not actually functional configuration,
    # but serves to illustrate the available configuration
    # options and document them in a way that is accessible
    # to users that `kubectl edit` this config map.
    #
    # These sample configuration options may be copied out of
    # this example block and unindented to be in the data block
    # to actually change the configuration.

    # The Mako environment in which we are running.
    # Only our performance automation should run in "prod", but
    # there should be a "dev" environment with a fairly broad
    # write ACL.  Users can also develop against custom configurations
    # by adding `foo.config` under their benchmark's kodata directory.
    environment: dev

    # Additional tags to tag the runs. These tags are added
    # to the list that the binary itself publishes (Kubernetes version, etc).
    # It is a comma separated list of tags.
    additionalTags: "key=value,absolute"

  # Replace the value with config of the benchmark you want to run
  dev.config: |
    ### Creating this benchmark:
    # mako create_benchmark test/performance/channel-imc/dev.config
    ### Updating this benchmark:
    # mako update_benchmark test/performance/channel-imc/dev.config

    project_name: "Knative"
    benchmark_name: "Development - IMC Channel Latency & Throughput"
    description: "Measure latency and throughput of channels."
    benchmark_key: '4926580618952704'

    # Human owners for manual benchmark adjustments.
    owner_list: "grantrodgers@google.com"
    owner_list: "chizhg@google.com"
    owner_list: "xiyue@google.com"
    owner_list: "gracegao@google.com"
    owner_list: "nachocano@google.com"
    owner_list: "cshou@google.com"

    # Anyone can add their IAM robot here to publish to this benchmark.
    owner_list: "mako-job@knative-performance.iam.gserviceaccount.com"
    # This is grantrodgers' robot:
    owner_list: "mako-upload@grantrodgers-crd.iam.gserviceaccount.com"
    owner_list: "mako-upload@xiyue-knative-project.iam.gserviceaccount.com"
    owner_list: "mako-upload@gracegao-knative-gcp-testing.iam.gserviceaccount.com"
    owner_list: "mako-upload@knative-project-228222.iam.gserviceaccount.com"
    owner_list: "mako-upload@cshou-playground.iam.gserviceaccount.com"

    # Define the name and type for x-axis of run charts
    input_value_info: {
      value_key: "t"
      label: "time"
      type: TIMESTAMP
    }

    # Note: value_key is stored repeatedly and should be very short (ideally one or two characters).
    metric_info_list: {
      value_key: "pl"
      label: "publish-latency"
    }
    metric_info_list: {
      value_key: "pe"
      label: "publish-errors"
    }
    metric_info_list: {
      value_key: "st"
      label: "send-throughput"
    }
    metric_info_list: {
      value_key: "dl"
      label: "deliver-latency"
    }
    metric_info_list: {
      value_key: "de"
      label: "deliver-errors"
    }
    metric_info_list: {
      value_key: "dt"
      label: "deliver-throughput"
    }
    metric_info_list: {
      value_key: "ft"
      label: "failure-throughput"
    }
