Skip to content
Snippets Groups Projects
Commit 74fb652c authored by Lange, Dr. Herbert's avatar Lange, Dr. Herbert
Browse files

add report-limit parameter to config

parent 8de2b80d
No related branches found
No related tags found
No related merge requests found
Pipeline #12388 passed
......@@ -26,6 +26,9 @@ public class Config {
@JsonProperty("parameters")
Map<String,String> parameters = new HashMap<>();
@JsonProperty("report-limit")
int reportLimit = 0;
public Config() {
}
......@@ -90,12 +93,21 @@ public class Config {
return props;
}
public int getReportLimit() {
return reportLimit;
}
public void setReportLimit(int reportLimit) {
this.reportLimit = reportLimit;
}
@Override
public String toString() {
return "Config{" +
"name='" + name + '\'' +
", functions=" + String.join(",", functions) +
", params=" + parameters +
", report-limit=" + reportLimit +
'}';
}
}
......@@ -32,7 +32,8 @@ class CorpusThread extends Thread {
Function<String,Void> callbackFunction;
CorpusThread(String name, String infile, String outfile, List<String> functions, Properties properties,
Function<String, Void> callback) {
int reportLimit, Function<String, Void> callback) {
Report.reportLimit = reportLimit;
this.corpusName=name;
if (infile.equals("tmp"))
this.inFile = System.getProperty("java.io.tmpdir") + "/corpus-files";
......
......@@ -109,6 +109,7 @@ public class GUI {
, "tmp" // write report to tmp
, config.getFunctions()
, config.getParametersAsProperties()
, config.reportLimit
, callback);
worker.start();
} catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment