Skip to content

Commit

Permalink
[NGRINDER-555] Provide network usage graph
Browse files Browse the repository at this point in the history
If there is no network data, return empty list, to avoid error in client
side.
  • Loading branch information
Mavlarn committed Mar 14, 2013
1 parent c417276 commit e5290ca
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1414,8 +1414,8 @@ public Map<String, String> getSystemMonitorDataAsString(long testId, String moni
try {
StringBuilder sbUsedMem = new StringBuilder("[");
StringBuilder sbCPUUsed = new StringBuilder("[");
StringBuilder sbNetReceieved = null;
StringBuilder sbNetSent = null;
StringBuilder sbNetReceieved = new StringBuilder("[");
StringBuilder sbNetSent = new StringBuilder("[");

br = new BufferedReader(new FileReader(monitorDataFile));
br.readLine(); // skip the header.
Expand All @@ -1428,8 +1428,6 @@ public Map<String, String> getSystemMonitorDataAsString(long testId, String moni
boolean isNetDataExist = false;
if (StringUtils.split(line, ",").length > 6) {
isNetDataExist = true;
sbNetReceieved = new StringBuilder("[");
sbNetSent = new StringBuilder("[");
}
int kbSize = 1024;
while (StringUtils.isNotBlank(line)) {
Expand Down

0 comments on commit e5290ca

Please sign in to comment.