[ https://issues.apache.org/jira/browse/BEAM-7721?focusedWorklogId=293772&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-293772 ]
ASF GitHub Bot logged work on BEAM-7721: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Aug/19 09:32 Start Date: 13/Aug/19 09:32 Worklog Time Spent: 10m Work Description: lgajowy commented on pull request #9295: [BEAM-7721] Add write test to BigQueryIOIT URL: https://github.com/apache/beam/pull/9295#discussion_r313302292 ########## File path: sdks/java/io/bigquery-io-perf-tests/src/test/java/org/apache/beam/sdk/bigqueryioperftests/BigQueryIOIT.java ########## @@ -151,46 +172,45 @@ private static void createAndFillSourceTable() { return tableRow; }) .withCustomGcsTempLocation(ValueProvider.StaticValueProvider.of(tempRoot)) + .withMethod(method) .withSchema( new TableSchema() .setFields( Collections.singletonList( new TableFieldSchema().setName("data").setType("BYTES"))))); - pipeline.run().waitUntilFinish(); + + PipelineResult pipelineResult = pipeline.run(); + pipelineResult.waitUntilFinish(); + extractAndPublishTime(pipelineResult, WRITE_TIME_METRIC_NAME); } - private static boolean checkForSourceTable() { - BigQueryOptions options = BigQueryOptions.newBuilder().build(); - BigQuery client = options.getService(); - TableId tableId = - TableId.of(options.getProjectId(), bigQuerySourceDataset, bigQuerySourceTable); - Table sourceTable = client.getTable(tableId, TableOption.fields(BigQuery.TableField.TYPE)); - return sourceTable != null; + private void extractAndPublishTime(PipelineResult pipelineResult, String writeTimeMetricName) { Review comment: If we're using this private method in `restRead` too, it should go below it to be more readable. Could you move this? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 293772) Time Spent: 8h 50m (was: 8h 40m) > Measure throughput in BigQueryIO read in Java > --------------------------------------------- > > Key: BEAM-7721 > URL: https://issues.apache.org/jira/browse/BEAM-7721 > Project: Beam > Issue Type: Improvement > Components: testing > Reporter: Michal Walenia > Assignee: Michal Walenia > Priority: Major > Time Spent: 8h 50m > Remaining Estimate: 0h > > Collect bytes/time metric in BQ read tests in Java SDK -- This message was sent by Atlassian JIRA (v7.6.14#76016)