diff --git a/src/main/java/network/brightspots/rcv/GuiTabulateController.java b/src/main/java/network/brightspots/rcv/GuiTabulateController.java index ffe8dbd3c..5621bca22 100644 --- a/src/main/java/network/brightspots/rcv/GuiTabulateController.java +++ b/src/main/java/network/brightspots/rcv/GuiTabulateController.java @@ -112,7 +112,7 @@ public void initialize(GuiConfigController controller, int numCandidates, int nu guiConfigController = controller; numberOfCandidates.setText("Number of candidates: " + numCandidates); numberOfCvrFiles.setText("Number of CVR Files: " + numCvrs); - numberOfBallots.setText("Number of Ballots: "); + numberOfBallots.setText("Number of Ballots: "); numberOfBallots.setOpacity(0.5); filledFieldStyle = ""; unfilledFieldStyle = "-fx-border-color: red;"; @@ -190,6 +190,8 @@ public void buttonOpenResultsClicked(ActionEvent actionEvent) { } private void watchTabulatorServiceProgress(Service service) { + // Measure time it takes for the function to complete + long startTime = System.currentTimeMillis(); EventHandler onSuceededEvent = workerStateEvent -> { lastTaskFailed = service.getValue(); if (lastTaskFailed) { @@ -198,6 +200,8 @@ private void watchTabulatorServiceProgress(Service service) { openResultsButton.setText(buttonViewErrorLogsText); } enableButtonsUpTo(openResultsButton); + long endTime = System.currentTimeMillis(); + Logger.info("Tabulation took " + (endTime - startTime) / 1000 + " seconds."); }; watchGenericService(service, onSuceededEvent); }