Skip to content
Snippets Groups Projects
Commit 21a723ef authored by Jan Kožusznik's avatar Jan Kožusznik
Browse files

fix: download statistics with results

parent 2734da1a
No related branches found
No related tags found
No related merge requests found
...@@ -422,7 +422,7 @@ public class BenchmarkJobManager implements Closeable { ...@@ -422,7 +422,7 @@ public class BenchmarkJobManager implements Closeable {
Set<String> otherFiles = extractNames(getOutputDirectory().resolve(mainFile)); Set<String> otherFiles = extractNames(getOutputDirectory().resolve(mainFile));
try { try {
return job return job
.startDownload(downloadFileNameExtractDecorator(name -> otherFiles.contains(name))); .startDownload(downloadFileNameExtractDecorator( downloadCSVDecorator( name -> otherFiles.contains(name))));
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -670,7 +670,7 @@ public class BenchmarkJobManager implements Closeable { ...@@ -670,7 +670,7 @@ public class BenchmarkJobManager implements Closeable {
.walltimeLimit(Constants.HAAS_TIMEOUT).numberOfCoresPerNode(Constants.CORES_PER_NODE).build(); .walltimeLimit(Constants.HAAS_TIMEOUT).numberOfCoresPerNode(Constants.CORES_PER_NODE).build();
} }
private static Predicate<String> downloadFileNameExtractDecorator(Predicate<String> decorated) { static private Predicate<String> downloadFileNameExtractDecorator(Predicate<String> decorated) {
return name -> { return name -> {
Path path = getPathSafely(name); Path path = getPathSafely(name);
if (path == null) if (path == null)
...@@ -680,8 +680,18 @@ public class BenchmarkJobManager implements Closeable { ...@@ -680,8 +680,18 @@ public class BenchmarkJobManager implements Closeable {
return decorated.test(fileName); return decorated.test(fileName);
}; };
} }
static private Predicate<String> downloadCSVDecorator(Predicate<String> decorated) {
return name -> {
if(name.toLowerCase().endsWith(".csv")) {
return true;
}
return decorated.test(name);
};
}
private static Predicate<String> downloadFailedData() { static private Predicate<String> downloadFailedData() {
return name -> { return name -> {
Path path = getPathSafely(name); Path path = getPathSafely(name);
if (path == null) if (path == null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment