[
https://issues.apache.org/jira/browse/BEAM-6431?focusedWorklogId=194716&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-194716
]
ASF GitHub Bot logged work on BEAM-6431:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Feb/19 18:06
Start Date: 05/Feb/19 18:06
Worklog Time Spent: 10m
Work Description: ajamato commented on pull request #7676: DO NOT SUBMIT
[BEAM-6431] Implement Execution Time metrics start,process,finish in the Java
SDK
URL: https://github.com/apache/beam/pull/7676#discussion_r253981147
##########
File path:
runners/core-java/src/test/java/org/apache/beam/runners/core/metrics/MonitoringInfoMatchers.java
##########
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ */
+package org.apache.beam.runners.core.metrics;
+
+import org.apache.beam.model.fnexecution.v1.BeamFnApi.MonitoringInfo;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+
+/** Matchers for {@link MonitoringInfo}. */
+public class MonitoringInfoMatchers {
+
+ /**
+ * Matches a {@link MonitoringInfo} with that has the set fields in the
provide MonitoringInfo.
+ *
+ * <p>This is useful for tests which do not want to match the specific value
(execution times).
+ * Currently this will only check for URNs, labels, type URNs and
int64Values.
+ */
+ public static TypeSafeMatcher<MonitoringInfo> matchSetFields(final
MonitoringInfo mi) {
+ return new TypeSafeMatcher<MonitoringInfo>() {
+
+ @Override
+ protected boolean matchesSafely(MonitoringInfo item) {
+ // Match the URN.
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 194716)
Time Spent: 2h 50m (was: 2h 40m)
> Add ExecutionTime metrics to the Beam Java SDK
> ----------------------------------------------
>
> Key: BEAM-6431
> URL: https://issues.apache.org/jira/browse/BEAM-6431
> Project: Beam
> Issue Type: New Feature
> Components: java-fn-execution
> Reporter: Alex Amato
> Assignee: Alex Amato
> Priority: Major
> Time Spent: 2h 50m
> Remaining Estimate: 0h
>
> This will be done by using the Dataflow worker's StateSampler code. I haveĀ
> put together a refactoring plan
> [here|https://docs.google.com/document/d/1OlAJf4T_CTL9WRH8lP8uQOfLjWYfm8IpRXSe38g34k4/edit#]
> This will include estimating the processing time for the start, process and
> finish bundle. The python SDK already has an implementation of this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)