Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/13471 )
Change subject: metrics-test: fix wrong metric name and improve metric filtering test ...................................................................... Patch Set 2: (4 comments) http://gerrit.cloudera.org:8080/#/c/13471/1//COMMIT_MSG Commit Message: PS1: > The reversal of arguments in ASSERT_STR_CONTAINS within metrics-test makes The string used to test metric name filter is wrong, it should be "test_counter" but not "My Test Counter". http://gerrit.cloudera.org:8080/#/c/13471/1/src/kudu/util/metrics-test.cc File src/kudu/util/metrics-test.cc: http://gerrit.cloudera.org:8080/#/c/13471/1/src/kudu/util/metrics-test.cc@204 PS1, Line 204: std::unordered_map<string, int64_t> metric_map; > Does WriteAsJson guarantee some deterministic order to the output? Otherwis Done http://gerrit.cloudera.org:8080/#/c/13471/1/src/kudu/util/metrics-test.cc@219 PS1, Line 219: const rapidjson::Value* attributes; > Likewise, how will this match given the substring? The metric name of test_counter is wrong, it is "test_counter" instead of "my test counter". if use "test count" to filter metrics, we only got a empty string, that is why the order of arguments in ASSERT_STR_CONTAINS is wrong and the test could still pass. http://gerrit.cloudera.org:8080/#/c/13471/1/src/kudu/util/metrics-test.cc@238 PS1, Line 238: out.str(""); > Given the underscore, how can this match as a case-insensitive substring of It should match "test_counter". -- To view, visit http://gerrit.cloudera.org:8080/13471 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Iec50aa2364d5d5f98a89d4aa7a3b213a39afd569 Gerrit-Change-Number: 13471 Gerrit-PatchSet: 2 Gerrit-Owner: Yifan Zhang <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Comment-Date: Fri, 31 May 2019 11:32:27 +0000 Gerrit-HasComments: Yes
