Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: net/tools/flip_server/loadtime_measurement.h

Issue 93793004: Format and Refactor Flip Server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/flip_server/http_message_constants.cc ('k') | net/tools/flip_server/mem_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/flip_server/loadtime_measurement.h
diff --git a/net/tools/flip_server/loadtime_measurement.h b/net/tools/flip_server/loadtime_measurement.h
index b46217e4fe1a31662dbc7146e57852fbf1022f6c..ccbb2e53234263d359310b72545a85585d0ebf6a 100644
--- a/net/tools/flip_server/loadtime_measurement.h
+++ b/net/tools/flip_server/loadtime_measurement.h
@@ -44,7 +44,7 @@ class LoadtimeMeasurement {
}
if (action.find("get_total_iteration") == 0) {
char buffer[16];
- snprintf(buffer, 16, "%d", num_urls_);
+ snprintf(buffer, sizeof(buffer), "%d", num_urls_);
output.append(buffer, strlen(buffer));
return;
}
@@ -60,7 +60,8 @@ class LoadtimeMeasurement {
}
if (action.find("test_complete") == 0) {
for (std::map<std::string, int>::const_iterator it = loadtimes_.begin();
- it != loadtimes_.end(); ++it) {
+ it != loadtimes_.end();
+ ++it) {
LOG(INFO) << it->first << " " << it->second;
}
loadtimes_.clear();
@@ -99,7 +100,8 @@ class LoadtimeMeasurement {
close(fd);
}
- void split_string(std::string& str, char sepa,
+ void split_string(const std::string& str,
+ char sepa,
std::vector<std::string>* sub_strs) {
size_t b = 0;
size_t e = str.find_first_of(sepa, b);
@@ -120,4 +122,3 @@ class LoadtimeMeasurement {
};
#endif // NET_TOOLS_FLIP_SERVER_LOADTIME_MEASUREMENT_H__
-
« no previous file with comments | « net/tools/flip_server/http_message_constants.cc ('k') | net/tools/flip_server/mem_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698