Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/22314 )
Change subject: KUDU-3563 Output tablet-level metrics in Prometheus ...................................................................... Patch Set 9: (6 comments) Almost there: LINT pointed to a formatting issue -- that needs to be fixed, and there are a few minor items to address. http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc File src/kudu/util/test_util.cc: http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@732 PS9, Line 732: line.substr(0, 6) == "# HELP" nit: I missed mentioning this in prior rounds (probably, because I pointed to strings::Split() already), but it's better late than never: consider using HasPrefixString() from gutil/strings/util.h for prefix-related assertions. http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@734 PS9, Line 734: line.substr(0, 6) == "# TYPE" ditto http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@746 PS9, Line 746: vector<string>(strings::Split(group[0], " "))[2] here and below: before trying to access an element at index 2, does it make sense to assert that the size of the container is at least 3? http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@749 PS9, Line 749: ASSERT_TRUE(metric_names.find(name_from_help_line) == metric_names.end()) : << "The same metric is repeated."; : metric_names.emplace(name_from_help_line); nit: consider switching to a concise and debug-friendly alternative ASSERT_TRUE(metric_names.emplace(name_from_help_line).second) << name_from_help_line << ": duplicate metric"; http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@753 PS9, Line 753: ASSERT_EQ(group[i].substr(0, name_from_help_line.length()), name_from_help_line) nit: consider using HasPrefixString() here as well http://gerrit.cloudera.org:8080/#/c/22314/9/src/kudu/util/test_util.cc@754 PS9, Line 754: : nit: either add the expected metric name into the output or remove the trailing colon? -- To view, visit http://gerrit.cloudera.org:8080/22314 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id033a1410966167d9bb24f6a44c584e73c17a4af Gerrit-Change-Number: 22314 Gerrit-PatchSet: 9 Gerrit-Owner: Ádám Bakai <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Ádám Bakai <[email protected]> Gerrit-Comment-Date: Wed, 29 Jan 2025 18:00:10 +0000 Gerrit-HasComments: Yes
