# Copyright 2020 TriggerMesh Inc.
#
# 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.

apiVersion: v1
kind: ConfigMap
metadata:
  name: config-mako
  namespace: perf-thrpt-receiver
data:

  # 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: ""

  dev.config: |
    # Create this benchmark with the mako tool: mako create_benchmark dev.config
    # Update this benchmark with the mako tool: mako update_benchmark dev.config
    # Learn more about the mako tool at
    # https://github.com/google/mako/blob/master/docs/CLI.md.

    project_name: "TriggerMesh perf"
    benchmark_name: "Event throughput"
    description: "Measure throughput of received events."
    benchmark_key: ''

    # 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: "rt"
      label: "receive-throughput"
    }
    metric_info_list: {
      value_key: "q"
      label: "queue-length"
    }
