Pranay Singh has posted comments on this change. ( http://gerrit.cloudera.org:8080/8215 )
Change subject: IMPALA-5142 EventSequence displays negative elapsed time. ...................................................................... Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/8215/4/be/src/util/runtime-profile-counters.h File be/src/util/runtime-profile-counters.h: http://gerrit.cloudera.org:8080/#/c/8215/4/be/src/util/runtime-profile-counters.h@326 PS4, Line 326: bool eventlist_sorted = true; : int64_t prev = 0L; : for (const Event& event: events_) { : if (event.second < prev) { : eventlist_sorted = false; : break; : } : prev = event.second; : } : > why bother with this? the list is pretty short and this isn't a critical pa Since the list is sorted in most of the times calling sort() may be expensive (if in future # of events becomes large), hence I'll use the std::is_sorted() instead. http://gerrit.cloudera.org:8080/#/c/8215/4/be/src/util/runtime-profile-counters.h@336 PS4, Line 336: [](Event const &event1, > nit: how about breaking the line before the [] instead of in the middle of Done -- To view, visit http://gerrit.cloudera.org:8080/8215 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8c944396d96473b17b453da3e913ffc56680a896 Gerrit-Change-Number: 8215 Gerrit-PatchSet: 4 Gerrit-Owner: Pranay Singh Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Pranay Singh Gerrit-Comment-Date: Wed, 01 Nov 2017 22:24:19 +0000 Gerrit-HasComments: Yes