private void compareExtractStatistics(ExtractStatistics expected, ExtractStatistics value) { assertEquals(expected, value); compareStatistics(expected, value); assertEquals(expected.getDestinationUriFileCounts(), value.getDestinationUriFileCounts()); }
private void compareLoadStatistics(LoadStatistics expected, LoadStatistics value) { assertEquals(expected, value); compareStatistics(expected, value); assertEquals(expected.getInputBytes(), value.getInputBytes()); assertEquals(expected.getInputFiles(), value.getInputFiles()); assertEquals(expected.getOutputBytes(), value.getOutputBytes()); assertEquals(expected.getOutputRows(), value.getOutputRows()); }
@Test public void testToPbAndFromPb() { compareExtractStatistics( EXTRACT_STATISTICS, ExtractStatistics.fromPb(EXTRACT_STATISTICS.toPb())); compareLoadStatistics(LOAD_STATISTICS, LoadStatistics.fromPb(LOAD_STATISTICS.toPb())); compareQueryStatistics(QUERY_STATISTICS, QueryStatistics.fromPb(QUERY_STATISTICS.toPb())); compareStatistics(COPY_STATISTICS, CopyStatistics.fromPb(COPY_STATISTICS.toPb())); compareLoadStatistics( LOAD_STATISTICS_INCOMPLETE, LoadStatistics.fromPb(LOAD_STATISTICS_INCOMPLETE.toPb())); compareQueryStatistics( QUERY_STATISTICS_INCOMPLETE, QueryStatistics.fromPb(QUERY_STATISTICS_INCOMPLETE.toPb())); }
private void compareQueryStatistics(QueryStatistics expected, QueryStatistics value) { assertEquals(expected, value); compareStatistics(expected, value); assertEquals(expected.getBillingTier(), value.getBillingTier()); assertEquals(expected.getCacheHit(), value.getCacheHit()); assertEquals(expected.getDdlOperationPerformed(), value.getDdlOperationPerformed()); assertEquals(expected.getDdlTargetTable(), value.getDdlTargetTable()); assertEquals(expected.getEstimatedBytesProcessed(), value.getEstimatedBytesProcessed()); assertEquals(expected.getTotalBytesBilled(), value.getTotalBytesBilled()); assertEquals(expected.getTotalBytesProcessed(), value.getTotalBytesProcessed()); assertEquals(expected.getTotalPartitionsProcessed(), value.getTotalPartitionsProcessed()); assertEquals(expected.getTotalSlotMs(), value.getTotalSlotMs()); assertEquals(expected.getQueryPlan(), value.getQueryPlan()); assertEquals(expected.getReferencedTables(), value.getReferencedTables()); assertEquals(expected.getSchema(), value.getSchema()); assertEquals(expected.getStatementType(), value.getStatementType()); assertEquals(expected.getTimeline(), value.getTimeline()); }