Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishapi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishapi
Commits
bcf25f55
Commit
bcf25f55
authored
Sep 02, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
govarnishlog can print a r/w channel length high watermark.
parent
0bc3a52b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
govarnishlog.go
cmd/govarnishlog/govarnishlog.go
+7
-0
No files found.
cmd/govarnishlog/govarnishlog.go
View file @
bcf25f55
...
...
@@ -67,6 +67,7 @@ var (
eol
=
uint64
(
0
)
printTxFunc
=
printTxTerse
printRecFunc
=
printRecTerse
chanHi
=
0
)
func
newIdle
(
seen
uint64
,
seenLast
uint64
,
t
time
.
Time
,
...
...
@@ -112,6 +113,10 @@ func txReader(q *log.Query, txChan chan []log.Tx, statusChan chan log.Status,
return
}
txChan
<-
txGrp
chanLen
:=
len
(
txChan
)
if
chanLen
>
chanHi
{
chanHi
=
chanLen
}
seen
++
}
}
...
...
@@ -252,6 +257,8 @@ LOOP:
stop
.
Sub
(
start
))
fmt
.
Fprintf
(
os
.
Stderr
,
"%d tx grps read
\n
"
,
seen
)
fmt
.
Fprintf
(
os
.
Stderr
,
"%d tx grps written
\n
"
,
n
)
fmt
.
Fprintf
(
os
.
Stderr
,
"%d r/w channel high watermark
\n
"
,
chanHi
)
fmt
.
Fprintf
(
os
.
Stderr
,
"%d times reader at eol
\n
"
,
eol
)
fmt
.
Fprintf
(
os
.
Stderr
,
"%v reader total idle time
\n
"
,
totIdle
)
fmt
.
Fprintf
(
os
.
Stderr
,
"%v mean idle time
\n
"
,
...
...
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