Skip to content

Commit 3aa16c6

Browse files
committed
fix
1 parent 64ae11e commit 3aa16c6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

managed_vms/memcache_loadtest/src/main/java/com/google/cloud/cache/apps/loadtest/QpsLoadTestServlet.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ public void run() {
7272
} catch (Exception e) {
7373
throw new RuntimeException(e);
7474
}
75+
writer.write(String.format("QPS %s\n", ExecutionTracker.getInstance().getAndResetQps()));
7576
writer.write(
76-
String.format("memcache QPS %s<br>", ExecutionTracker.getInstance().getAndResetQps()));
77-
writer.write(
78-
String.format(
79-
"memcache Errors %s<br>", ExecutionTracker.getInstance().getAndResetErrorCount()));
77+
String.format("Errors %s\n", ExecutionTracker.getInstance().getAndResetErrorCount()));
78+
writer.flush();
8079
}
8180
for (Future future : futures) {
8281
try {

managed_vms/memcache_loadtest/src/main/java/com/google/cloud/cache/apps/loadtest/ResponseWriter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ void write(String key, String value) throws IOException {
2323
response.getWriter().printf("%s: %s\n", key, value);
2424
}
2525

26+
void flush() throws IOException {
27+
response.getWriter().flush();
28+
}
29+
2630
void fail() {
2731
response.setStatus(507);
2832
}

0 commit comments

Comments
 (0)