Skip to content
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

connection: Separate out lastActivity into recv and send activity #770

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

witriew
Copy link
Contributor

@witriew witriew commented Mar 19, 2020

lastActivity recorded when the last receive or send activity occurred over
its connection. Separate this out into lastActivityRecv and
lastActivitySend to observe the last receives or sends allowing monitoring of
the elapsed time between reading from the recv buffer and writing to the send
buffer. This will provide information on how stalled either buffer is.

@witriew witriew requested a review from prashantv March 19, 2020 05:01
@codecov
Copy link

codecov bot commented Mar 19, 2020

Codecov Report

Merging #770 into dev will increase coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #770      +/-   ##
==========================================
+ Coverage   88.22%   88.39%   +0.16%     
==========================================
  Files          41       41              
  Lines        4145     4161      +16     
==========================================
+ Hits         3657     3678      +21     
+ Misses        371      366       -5     
  Partials      117      117              
Impacted Files Coverage Δ
connection.go 89.01% <100.00%> (+1.22%) ⬆️
idle_sweep.go 96.36% <100.00%> (+0.28%) ⬆️
introspection.go 95.13% <100.00%> (+0.02%) ⬆️
channel.go 88.46% <0.00%> (-1.65%) ⬇️
preinit_connection.go 92.70% <0.00%> (-1.46%) ⬇️
peer.go 93.81% <0.00%> (-0.73%) ⬇️
mex.go 73.45% <0.00%> (+0.94%) ⬆️
relay.go 83.83% <0.00%> (+1.19%) ⬆️
outbound.go 90.05% <0.00%> (+2.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41382bf...9c849e1. Read the comment docs.

@witriew witriew force-pushed the topic/wit/lastactivity_ts branch 2 times, most recently from 30e81f2 to 8cd9d4e Compare March 19, 2020 05:03
@witriew witriew changed the title connection: Separate out LastActivity into recv and send activity connection: Separate out lastActivity into recv and send activity Mar 19, 2020
connection.go Outdated Show resolved Hide resolved
connection.go Outdated Show resolved Hide resolved
connection.go Outdated
func (c *Connection) updateLastActivitySend(frame *Frame) {
// Pings are ignored for last activity.
switch frame.Header.messageType {
case messageTypeCallReq, messageTypeCallReqContinue, messageTypeCallRes, messageTypeCallResContinue, messageTypeError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we consider the same frames in both cases, can we move that into a separate private function

@alxn
Copy link
Contributor

alxn commented Mar 20, 2020

        18:04:32.676015 [D] reader failed: tchannel error ErrCodeTimeout: timeout existing err: tchannel error ErrCodeTimeout: timeout [{serviceName testService-client} {process testService-client-1347} {chID 1832} {connID 1028} {localAddr 127.0.0.1:59382} {remoteAddr 127.0.0.1:40123} {remoteHostPort 127.0.0.1:40123} {remoteIsEphemeral false} {remoteProcess relay-40123} {outboundHP 127.0.0.1:40123} {connectionDirection outbound} {Out-Response 39}]
        18:04:32.676165 [D] Creatin
The job exceeded the maximum log length, and has been terminated.

err restarted

`lastActivity` recorded when the last receive or send activity occurred over
its connection.  Separate this out into `lastActivityRecv` and
`lastActivitySend` to observe the last receives or sends allowing monitoring of
the elapsed time between reading from the recv buffer and writing to the send
buffer.   This will provide information on how stalled either buffer is.
@witriew witriew merged commit 9c849e1 into dev Mar 27, 2020
@witriew witriew deleted the topic/wit/lastactivity_ts branch March 27, 2020 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants