Formatting.

This commit is contained in:
U-BASIS\dgrove 2017-11-30 16:59:39 -05:00
parent a6b115b35e
commit a5408e8a4a
2 changed files with 30 additions and 29 deletions

View File

@ -133,6 +133,7 @@ final class AutoIngestMetricsCollector {
* A single job metric for an auto ingest cluster.
*/
static final class JobMetric {
private final long completedDate;
private final long dataSourceSize;

View File

@ -67,7 +67,7 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
* Update the metrics shown in the report text area.
*/
private void updateMetrics() {
if(datePicker.getDate() == null) {
if (datePicker.getDate() == null) {
return;
}
@ -77,8 +77,8 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
long dataSourceSizeTotal = 0;
long pickedDate = datePicker.getDate().atStartOfDay().toEpochSecond(ZoneOffset.UTC) * 1000;
for(JobMetric jobMetric : completedJobMetrics) {
if(jobMetric.getCompletedDate() >= pickedDate) {
for (JobMetric jobMetric : completedJobMetrics) {
if (jobMetric.getCompletedDate() >= pickedDate) {
jobsCompleted++;
dataSourceSizeTotal += jobMetric.getDataSourceSize();
}
@ -86,12 +86,12 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
SimpleDateFormat dateFormatter = new SimpleDateFormat("MMM d, yyyy");
reportTextArea.setText(String.format(
"Since %s:\n" +
"Number of Jobs Completed: %d\n" +
"Total Size of Data Sources: %.1f GB\n",
"Since %s:\n"
+ "Number of Jobs Completed: %d\n"
+ "Total Size of Data Sources: %.1f GB\n",
dateFormatter.format(Date.valueOf(datePicker.getDate())),
jobsCompleted,
(double)dataSourceSizeTotal / GIGABYTE_SIZE
(double) dataSourceSizeTotal / GIGABYTE_SIZE
));
}