From 2e4330fb03f7360c9689e0859ed9a20d616c1b47 Mon Sep 17 00:00:00 2001 From: Alex Amato Date: Mon, 13 Aug 2018 14:13:30 -0700 Subject: [PATCH] Move the metrics definitions to a yaml file. --- .../src/main/proto/metric_definitions.json | 56 ------------------ .../src/main/proto/metric_definitions.yaml | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 56 deletions(-) delete mode 100644 model/fn-execution/src/main/proto/metric_definitions.json create mode 100644 model/fn-execution/src/main/proto/metric_definitions.yaml diff --git a/model/fn-execution/src/main/proto/metric_definitions.json b/model/fn-execution/src/main/proto/metric_definitions.json deleted file mode 100644 index c0cc8f8c8330e..0000000000000 --- a/model/fn-execution/src/main/proto/metric_definitions.json +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - "annotations": { - "description": "The total estimated execution time of the ptransform", - "unit": "msecs" - }, - "labels": [ - "PTRANSFORM" - ], - "type": "beam:metrics:SumInt64", - "urn": "beam:metric:ptransform_execution_time:total_msecs:v1" - }, - { - "annotations": { - "description": "The total estimated execution time of the start bundle function in a pardo", - "unit": "msecs" - }, - "labels": [ - "PTRANSFORM" - ], - "type": "beam:metrics:SumInt64", - "urn": "beam:metric:pardo_execution_time:start_bundle_msecs:v1" - }, - { - "annotations": { - "description": "The total estimated execution time of the process bundle function in a pardo", - "unit": "msecs" - }, - "labels": [ - "PTRANSFORM" - ], - "type": "beam:metrics:SumInt64", - "urn": "beam:metric:pardo_execution_time:process_bundle_msecs:v1" - }, - { - "annotations": { - "description": "The total estimated execution time of the finish bundle function in a pardo", - "unit": "msecs" - }, - "labels": [ - "PTRANSFORM" - ], - "type": "beam:metrics:SumInt64", - "urn": "beam:metric:pardo_execution_time:finish_bundle_msecs:v1" - }, - { - "annotations": { - "description": "The total elements counted for a metric." - }, - "labels": [ - "PTRANSFORM" - ], - "type": "beam:metrics:SumInt64", - "urn": "beam:metric:element_count:v1" - } -] diff --git a/model/fn-execution/src/main/proto/metric_definitions.yaml b/model/fn-execution/src/main/proto/metric_definitions.yaml new file mode 100644 index 0000000000000..f32f7cded2b20 --- /dev/null +++ b/model/fn-execution/src/main/proto/metric_definitions.yaml @@ -0,0 +1,57 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# Metrics Definitions describing various BEAM metrics. +# See: https://s.apache.org/beam-fn-api-metrics + +- annotations: + description: The total estimated execution time of the ptransform + unit: msecs + labels: + - PTRANSFORM + type: beam:metrics:SumInt64 + urn: beam:metric:ptransform_execution_time:total_msecs:v1 +- annotations: + description: The total estimated execution time of the start bundle function in + a pardo + unit: msecs + labels: + - PTRANSFORM + type: beam:metrics:SumInt64 + urn: beam:metric:pardo_execution_time:start_bundle_msecs:v1 +- annotations: + description: The total estimated execution time of the process bundle function + in a pardo + unit: msecs + labels: + - PTRANSFORM + type: beam:metrics:SumInt64 + urn: beam:metric:pardo_execution_time:process_bundle_msecs:v1 +- annotations: + description: The total estimated execution time of the finish bundle function + in a pardo + unit: msecs + labels: + - PTRANSFORM + type: beam:metrics:SumInt64 + urn: beam:metric:pardo_execution_time:finish_bundle_msecs:v1 +- annotations: + description: The total elements counted for a metric. + labels: + - PTRANSFORM + type: beam:metrics:SumInt64 + urn: beam:metric:element_count:v1