r4553 - in trunk/varnish-cache: bin/varnishd bin/varnishstat include
kristian at projects.linpro.no
kristian at projects.linpro.no
Thu Feb 11 18:43:06 CET 2010
Author: kristian
Date: 2010-02-11 18:43:06 +0100 (Thu, 11 Feb 2010)
New Revision: 4553
Modified:
trunk/varnish-cache/bin/varnishd/cache_main.c
trunk/varnish-cache/bin/varnishstat/varnishstat.c
trunk/varnish-cache/include/stats.h
Log:
Remove old start_time code, replaced by VSL_stats->uptime
Modified: trunk/varnish-cache/bin/varnishd/cache_main.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_main.c 2010-02-11 11:58:01 UTC (rev 4552)
+++ trunk/varnish-cache/bin/varnishd/cache_main.c 2010-02-11 17:43:06 UTC (rev 4553)
@@ -136,8 +136,6 @@
if (params->diag_bitmap & 0x00020000)
SMP_Ready();
- VSL_stats->start_time = (time_t)TIM_real();
-
CLI_Run();
STV_close();
Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2010-02-11 11:58:01 UTC (rev 4552)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2010-02-11 17:43:06 UTC (rev 4553)
@@ -126,7 +126,7 @@
tt = tv.tv_usec * 1e-6 + tv.tv_sec;
lt = tt - lt;
- rt = tv.tv_sec - VSL_stats->start_time;
+ rt = VSL_stats->uptime;
up = rt;
mvprintw(0, 0, "%*s", COLS - 1, VSL_Name());
@@ -244,16 +244,8 @@
double up;
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) \
do { \
if (fields != NULL && ! show_field( #n, fields )) break; \
@@ -297,7 +289,6 @@
fprintf(stderr, "Varnishstat -f option fields:\n");
fprintf(stderr, "Field name Description\n");
fprintf(stderr, "---------- -----------\n");
- fprintf(stderr, "uptime Child uptime\n");
#define MAC_STAT(n, t, l, f, d) \
do { \
@@ -312,7 +303,6 @@
{
int i, valid_field, field_length;
const char *all_fields[] = {
- "uptime",
#define MAC_STAT(n, t, l, f, d) \
#n,
#include "stat_field.h"
Modified: trunk/varnish-cache/include/stats.h
===================================================================
--- trunk/varnish-cache/include/stats.h 2010-02-11 11:58:01 UTC (rev 4552)
+++ trunk/varnish-cache/include/stats.h 2010-02-11 17:43:06 UTC (rev 4553)
@@ -32,7 +32,6 @@
#include <stdint.h>
struct varnish_stats {
- time_t start_time;
#define MAC_STAT(n, t, l, f, e) t n;
#include "stat_field.h"
#undef MAC_STAT
More information about the varnish-commit
mailing list