Commit e5025c2b authored by Kristian Lyngstøl's avatar Kristian Lyngstøl

Remove old start_time code, replaced by VSL_stats->uptime


git-svn-id: http://www.varnish-cache.org/svn/trunk@4553 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ed05c0d5
...@@ -136,8 +136,6 @@ child_main(void) ...@@ -136,8 +136,6 @@ child_main(void)
if (params->diag_bitmap & 0x00020000) if (params->diag_bitmap & 0x00020000)
SMP_Ready(); SMP_Ready();
VSL_stats->start_time = (time_t)TIM_real();
CLI_Run(); CLI_Run();
STV_close(); STV_close();
......
...@@ -126,7 +126,7 @@ do_curses(struct varnish_stats *VSL_stats, int delay, const char *fields) ...@@ -126,7 +126,7 @@ do_curses(struct varnish_stats *VSL_stats, int delay, const char *fields)
tt = tv.tv_usec * 1e-6 + tv.tv_sec; tt = tv.tv_usec * 1e-6 + tv.tv_sec;
lt = tt - lt; lt = tt - lt;
rt = tv.tv_sec - VSL_stats->start_time; rt = VSL_stats->uptime;
up = rt; up = rt;
mvprintw(0, 0, "%*s", COLS - 1, VSL_Name()); mvprintw(0, 0, "%*s", COLS - 1, VSL_Name());
...@@ -244,15 +244,7 @@ do_once(struct varnish_stats *VSL_stats, const char* fields) ...@@ -244,15 +244,7 @@ do_once(struct varnish_stats *VSL_stats, const char* fields)
double up; double up;
gettimeofday(&tv, NULL); gettimeofday(&tv, NULL);
up = tv.tv_sec - VSL_stats->start_time; up = VSL_stats->uptime;
do {
if (fields != NULL && ! show_field("uptime", fields ))
break;
printf("%-16s %12ju %12s %s\n", "uptime",
(uintmax_t)(tv.tv_sec - VSL_stats->start_time),
". ", "Child uptime");
} while (0);
#define MAC_STAT(n, t, l, f, d) \ #define MAC_STAT(n, t, l, f, d) \
do { \ do { \
...@@ -297,7 +289,6 @@ list_fields(void) ...@@ -297,7 +289,6 @@ list_fields(void)
fprintf(stderr, "Varnishstat -f option fields:\n"); fprintf(stderr, "Varnishstat -f option fields:\n");
fprintf(stderr, "Field name Description\n"); fprintf(stderr, "Field name Description\n");
fprintf(stderr, "---------- -----------\n"); fprintf(stderr, "---------- -----------\n");
fprintf(stderr, "uptime Child uptime\n");
#define MAC_STAT(n, t, l, f, d) \ #define MAC_STAT(n, t, l, f, d) \
do { \ do { \
...@@ -312,7 +303,6 @@ valid_fields(const char* fields) ...@@ -312,7 +303,6 @@ valid_fields(const char* fields)
{ {
int i, valid_field, field_length; int i, valid_field, field_length;
const char *all_fields[] = { const char *all_fields[] = {
"uptime",
#define MAC_STAT(n, t, l, f, d) \ #define MAC_STAT(n, t, l, f, d) \
#n, #n,
#include "stat_field.h" #include "stat_field.h"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <stdint.h> #include <stdint.h>
struct varnish_stats { struct varnish_stats {
time_t start_time;
#define MAC_STAT(n, t, l, f, e) t n; #define MAC_STAT(n, t, l, f, e) t n;
#include "stat_field.h" #include "stat_field.h"
#undef MAC_STAT #undef MAC_STAT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment