Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
c9c1b040
Commit
c9c1b040
authored
Apr 25, 2014
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report available inbound bytes on socket
parent
6718f8a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
8 deletions
+22
-8
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+5
-3
PhysicalBridge.cs
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
+9
-2
PhysicalConnection.cs
...kExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
+5
-0
ServerEndPoint.cs
StackExchange.Redis/StackExchange/Redis/ServerEndPoint.cs
+3
-3
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
c9c1b040
...
...
@@ -1702,13 +1702,15 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
}
else
{
int
inst
,
qu
,
qs
,
qc
,
wr
,
wq
;
int
queue
=
server
.
GetOutstandingCount
(
message
.
Command
,
out
inst
,
out
qu
,
out
qs
,
out
qc
,
out
wr
,
out
wq
);
int
inst
,
qu
,
qs
,
qc
,
wr
,
wq
,
@in
;
int
queue
=
server
.
GetOutstandingCount
(
message
.
Command
,
out
inst
,
out
qu
,
out
qs
,
out
qc
,
out
wr
,
out
wq
,
out
@in
);
var
sb
=
new
StringBuilder
(
"Timeout performing "
).
Append
(
message
.
CommandAndKey
)
.
Append
(
", inst: "
).
Append
(
inst
)
.
Append
(
", queue: "
).
Append
(
queue
).
Append
(
", qu="
).
Append
(
qu
)
.
Append
(
", qs="
).
Append
(
qs
).
Append
(
", qc="
).
Append
(
qc
)
.
Append
(
", wr="
).
Append
(
wr
).
Append
(
"/"
).
Append
(
wq
);
.
Append
(
", wr="
).
Append
(
wr
).
Append
(
"/"
).
Append
(
wq
)
.
Append
(
", in="
).
Append
(
@in
);
errMessage
=
sb
.
ToString
();
if
(
stormLogThreshold
>=
0
&&
queue
>=
stormLogThreshold
&&
Interlocked
.
CompareExchange
(
ref
haveStormLog
,
1
,
0
)
==
0
)
{
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalBridge.cs
View file @
c9c1b040
...
...
@@ -209,12 +209,19 @@ internal void GetCounters(ConnectionCounters counters)
}
}
internal
int
GetOutstandingCount
(
out
int
inst
,
out
int
qu
,
out
int
qs
,
out
int
qc
,
out
int
wr
,
out
int
wq
)
internal
int
GetOutstandingCount
(
out
int
inst
,
out
int
qu
,
out
int
qs
,
out
int
qc
,
out
int
wr
,
out
int
wq
,
out
int
@in
)
{
// defined as: PendingUnsentItems + SentItemsAwaitingResponse + ResponsesAwaitingAsyncCompletion
inst
=
(
int
)(
Interlocked
.
Read
(
ref
operationCount
)
-
Interlocked
.
Read
(
ref
profileLastLog
));
qu
=
queue
.
Count
();
var
tmp
=
physical
;
qs
=
tmp
==
null
?
0
:
tmp
.
GetSentAwaitingResponseCount
();
if
(
tmp
==
null
)
{
qs
=
@in
=
0
;
}
else
{
qs
=
tmp
.
GetSentAwaitingResponseCount
();
@in
=
tmp
.
GetAvailableInboundBytes
();
}
qc
=
completionManager
.
GetOutstandingCount
();
wr
=
Interlocked
.
CompareExchange
(
ref
activeWriters
,
0
,
0
);
wq
=
Interlocked
.
CompareExchange
(
ref
inWriteQueue
,
0
,
0
);
...
...
StackExchange.Redis/StackExchange/Redis/PhysicalConnection.cs
View file @
c9c1b040
...
...
@@ -513,6 +513,11 @@ void BeginReading()
}
while
(
keepReading
);
}
internal
int
GetAvailableInboundBytes
()
{
return
this
.
socketToken
.
Available
;
}
SocketMode
ISocketCallback
.
Connected
(
Stream
stream
)
{
try
...
...
StackExchange.Redis/StackExchange/Redis/ServerEndPoint.cs
View file @
c9c1b040
...
...
@@ -329,15 +329,15 @@ internal ServerCounters GetCounters()
return
counters
;
}
internal
int
GetOutstandingCount
(
RedisCommand
command
,
out
int
inst
,
out
int
qu
,
out
int
qs
,
out
int
qc
,
out
int
wr
,
out
int
wq
)
internal
int
GetOutstandingCount
(
RedisCommand
command
,
out
int
inst
,
out
int
qu
,
out
int
qs
,
out
int
qc
,
out
int
wr
,
out
int
wq
,
out
int
@in
)
{
var
bridge
=
GetBridge
(
command
,
false
);
if
(
bridge
==
null
)
{
return
inst
=
qu
=
qs
=
qc
=
wr
=
wq
=
0
;
return
inst
=
qu
=
qs
=
qc
=
wr
=
wq
=
@in
=
0
;
}
return
bridge
.
GetOutstandingCount
(
out
inst
,
out
qu
,
out
qs
,
out
qc
,
out
wr
,
out
wq
);
return
bridge
.
GetOutstandingCount
(
out
inst
,
out
qu
,
out
qs
,
out
qc
,
out
wr
,
out
wq
,
out
@in
);
}
internal
string
GetProfile
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment