Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
9f04dd40
Commit
9f04dd40
authored
Dec 10, 2020
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishstat: New 'r'aw key binding
parent
0f5f457c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
varnishstat_bindings.h
bin/varnishstat/varnishstat_bindings.h
+8
-0
varnishstat_curses.c
bin/varnishstat/varnishstat_curses.c
+9
-4
No files found.
bin/varnishstat/varnishstat_bindings.h
View file @
9f04dd40
...
...
@@ -72,6 +72,14 @@ BINDING(UNSEEN,
"
\t
of varnishstat. Defaults to hide unseen counters."
)
BINDING_KEY
(
'r'
,
"r"
,)
BINDING
(
RAW
,
"
\t
Toggle between showing raw and adjusted gauges. When a gauge
\n
"
"
\t
is decremented faster than it is incremented, it may appear as
\n
"
"
\t
a large integer with its most significant bit set. By default
\n
"
"
\t
such values are adjusted to zero."
)
BINDING_KEY
(
'e'
,
"e"
,)
BINDING
(
SCALE
,
"
\t
Toggle scaling of values."
)
...
...
bin/varnishstat/varnishstat_curses.c
View file @
9f04dd40
...
...
@@ -935,7 +935,7 @@ handle_common_keypress(enum kb_e kb)
}
static
void
handle_points_keypress
(
enum
kb_e
kb
)
handle_points_keypress
(
struct
vsc
*
vsc
,
enum
kb_e
kb
)
{
switch
(
kb
)
{
...
...
@@ -973,6 +973,10 @@ handle_points_keypress(enum kb_e kb)
hide_unseen
=
1
-
hide_unseen
;
rebuild
=
REBUILD_NEXT
;
break
;
case
KB_RAW
:
VSC_Arg
(
vsc
,
'r'
,
NULL
);
rebuild
=
REBUILD_NEXT
;
break
;
case
KB_SCALE
:
scale
=
1
-
scale
;
rebuild
=
REBUILD_NEXT
;
...
...
@@ -1046,6 +1050,7 @@ handle_help_keypress(enum kb_e kb)
help_line
=
bindings_help_len
;
break
;
case
KB_UNSEEN
:
case
KB_RAW
:
case
KB_SCALE
:
case
KB_ACCEL
:
case
KB_DECEL
:
...
...
@@ -1072,7 +1077,7 @@ handle_help_keypress(enum kb_e kb)
}
static
void
handle_keypress
(
int
ch
)
handle_keypress
(
struct
vsc
*
vsc
,
int
ch
)
{
enum
kb_e
kb
;
...
...
@@ -1091,7 +1096,7 @@ handle_keypress(int ch)
if
(
show_help
)
handle_help_keypress
(
kb
);
else
handle_points_keypress
(
kb
);
handle_points_keypress
(
vsc
,
kb
);
}
static
void
*
v_matchproto_
(
VSC_new_f
)
...
...
@@ -1201,7 +1206,7 @@ do_curses(struct vsm *vsm, struct vsc *vsc)
break
;
#endif
default:
handle_keypress
(
ch
);
handle_keypress
(
vsc
,
ch
);
break
;
}
}
...
...
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