public String executionTimeFormatted() { return lapTimeFormatted(stop()); }
public String lapTimeFormatted() { validateStarted(); return lapTimeFormatted(currentTimeMillis() - startTime); }
private SingleRunTestStatistics(String fileName) { Stopwatch timer = Stopwatch.started(); this.fileName = fileName; this.headers = new String[]{STORY, TITLE, RESULT, DATE, STABILITY, DURATION}; this.records = records(); LOGGER.info("Loaded {} records from {} in {}", records.size(), fileName, timer.executionTimeFormatted()); }
private static List<File> getResourceDirectories(Path root, EnvironmentVariables environmentVariables) { if (RESOURCE_DIRECTORY_CACHE.containsKey(root)) { return RESOURCE_DIRECTORY_CACHE.get(root); } Stopwatch stopwatch = Stopwatch.started(); List<File> results; if (ThucydidesSystemProperty.SERENITY_REQUIREMENTS_DIR.isDefinedIn(environmentVariables)) { results = new ArrayList<>(); } else { results = listDirectories(root).parallelStream() .filter(path -> path.endsWith("src/test/resources")) .map(Path::toFile) .collect(Collectors.toList()); } RESOURCE_DIRECTORY_CACHE.put(root,results); LOGGER.debug("Resource directories found in {} in {} ms: {}", root, stopwatch.stop(), results); return results; }
public long stop() { validateStarted(); long result = currentTimeMillis() - startTime; startTime = 0; return result; }
private SingleRunTestStatistics(String fileName) { Stopwatch timer = Stopwatch.started(); this.fileName = fileName; this.headers = new String[]{STORY, TITLE, RESULT, DATE, STABILITY, DURATION}; this.records = records(); LOGGER.info("Loaded {} records from {} in {}", records.size(), fileName, timer.executionTimeFormatted()); }
public long lapTime() { validateStarted(); return currentTimeMillis() - startTime; }
public long stop(String message) { long result = stop(); LOGGER.debug("{} in {}", message, lapTimeFormatted(result)); return result; } }