-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-32259 Track time spent in different parts of Roxie receive thread #18885
HPCC-32259 Track time spent in different parts of Roxie receive thread #18885
Conversation
1df5f45
to
5086420
Compare
5d2e345
to
82cf9e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardkchapman looks good. A few minor comments.
roxie/udplib/udptrr.cpp
Outdated
} | ||
} | ||
{ | ||
UdpRdTracker::TimeDivision d(timeTracker, UdpRdTracker::pushing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Change to d.switchState, and line 1432
system/jlib/jmisc.hpp
Outdated
unsigned __int64 now = get_cycles_now(); | ||
if (reportIntervalCycles && now - lastReport >= reportIntervalCycles) | ||
report(true); | ||
if (newState != currentState) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Would be a fractionally clearer to use prevState in place of currentState. No need to change though.
doneOne = true; | ||
} | ||
if (reset) | ||
totals[i] = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also reset counts[i]?
system/jlib/jmisc.hpp
Outdated
if (doneOne) | ||
DBGLOG("%s", str.str()); | ||
if (reset) | ||
lastTick = now; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already done in line 393
report(true); | ||
if (newState != currentState) | ||
{ | ||
totals[currentState] += now - lastTick; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If report() has been called, this will cause totals to be set to a very high number - because lastTick will be set to the latest value of get_cycles_now() - which will be larger than 'now'.
Probably simplest to pass now into the report function, and have a public helper which does not require it to be passed (or similar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: This will self correct later, so maybe not worth worrying about - but if so, it is worth adding a comment to clarify.
82cf9e4
to
a7fd5dd
Compare
CHanges made following comments |
a7fd5dd
to
1cfa557
Compare
Signed-off-by: Richard Chapman <[email protected]>
1cfa557
to
65432ed
Compare
Type of change:
Checklist:
Smoketest:
Testing: