Skip to content

Commit

Permalink
Relaxes <= 0 to < 0 for measurements as diff of size 0 is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Sep 7, 2023
1 parent 39f2b65 commit 39d3fee
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,39 +66,39 @@ public Log(String headerCSV, String headerMarkdown, String lineCSV, String lineM
private String app = null;

public LogBuilder buildTimeMs(long buildTimeMs) {
if (buildTimeMs <= 0) {
if (buildTimeMs < 0) {
throw new IllegalArgumentException("buildTimeMs must be a positive long, was: " + buildTimeMs);
}
this.buildTimeMs = buildTimeMs;
return this;
}

public LogBuilder timeToFirstOKRequestMs(long timeToFirstOKRequestMs) {
if (timeToFirstOKRequestMs <= 0) {
if (timeToFirstOKRequestMs < 0) {
throw new IllegalArgumentException("timeToFirstOKRequestMs must be a positive long, was: " + timeToFirstOKRequestMs);
}
this.timeToFirstOKRequestMs = timeToFirstOKRequestMs;
return this;
}

public LogBuilder timeToFinishMs(long timeToFinishMs) {
if (timeToFinishMs <= 0) {
if (timeToFinishMs < 0) {
throw new IllegalArgumentException("timeToFinishMs must be a positive long, was: " + timeToFinishMs);
}
this.timeToFinishMs = timeToFinishMs;
return this;
}

public LogBuilder executableSizeKb(long executableSizeKb) {
if (executableSizeKb <= 0) {
if (executableSizeKb < 0) {
throw new IllegalArgumentException("executableSizeKb must be a positive long, was: " + executableSizeKb);
}
this.executableSizeKb = executableSizeKb;
return this;
}

public LogBuilder rssKb(long rssKb) {
if (rssKb <= 0) {
if (rssKb < 0) {
throw new IllegalArgumentException("rssKb must be a positive long, was: " + rssKb);
}
this.rssKb = rssKb;
Expand Down Expand Up @@ -141,7 +141,7 @@ public LogBuilder responseTime99Percentile(long responseTime99Percentile) {
}

public LogBuilder openedFiles(long openedFiles) {
if (openedFiles <= 0) {
if (openedFiles < 0) {
throw new IllegalArgumentException("openedFiles must be a positive long, was: " + openedFiles);
}
this.openedFiles = openedFiles;
Expand Down

0 comments on commit 39d3fee

Please sign in to comment.