private static TableLayout layoutAggregateOutput( TableLayoutBuilder master, MeasurementSuite measurements) { TableLayoutBuilder output = master.clone(); output.addColumn("BuildTime"); output.addColumn("TestTime"); for (MetricFactory<?> mf : measurements.getMetricFactories()) { List<String> labels = mf.getColumnLabels(); if (labels != null) { for (String c : labels) { output.addColumn(c); } } } return output.build(); }
private static TableLayout layoutUserTable( TableLayoutBuilder master, MeasurementSuite measurements) { TableLayoutBuilder perUser = master.clone(); perUser.addColumn("User"); perUser.addColumn("TestTime"); perUser.addColumn("TrainEvents"); perUser.addColumn("TestEvents"); for (MetricFactory<?> mf : measurements.getMetricFactories()) { List<String> userColumnLabels = mf.getUserColumnLabels(); if (userColumnLabels != null) { for (String c : userColumnLabels) { perUser.addColumn(c); } } } return perUser.build(); }