You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/02/05 21:53:30 UTC

mesos git commit: Removed the implicit and value changing conversion in log benchmark.

Repository: mesos
Updated Branches:
  refs/heads/master db29d426f -> 2a65da017


Removed the implicit and value changing conversion in log benchmark.

Whether `char` is signed or not is up to the implementation, so be more
explicit here. Also, since we want a `char` with all bits set, use a
value representation that more clearly communicates that.

Review: https://reviews.apache.org/r/43240/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2a65da01
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2a65da01
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2a65da01

Branch: refs/heads/master
Commit: 2a65da017562cfa7d55604ab95c6c2c9e6f001e4
Parents: db29d42
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Fri Feb 5 12:52:46 2016 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Feb 5 12:52:46 2016 -0800

----------------------------------------------------------------------
 src/log/tool/benchmark.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2a65da01/src/log/tool/benchmark.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.cpp b/src/log/tool/benchmark.cpp
index 9cb60bd..770c6d8 100644
--- a/src/log/tool/benchmark.cpp
+++ b/src/log/tool/benchmark.cpp
@@ -206,7 +206,7 @@ Try<Nothing> Benchmark::execute(int argc, char** argv)
   vector<string> data;
   for (size_t i = 0; i < sizes.size(); i++) {
     if (flags.type == "one") {
-      data.push_back(string(sizes[i].bytes(), 255));
+      data.push_back(string(sizes[i].bytes(), static_cast<char>(0xff)));
     } else if (flags.type == "random") {
       data.push_back(string(sizes[i].bytes(), ::random() % 256));
     } else {