Re: [PATCH 17/18] Removed only written roundtrip_stat field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 26, 2016 at 09:12:50AM +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/main-channel-client.c |  3 ---
>  server/reds-private.h        |  1 -
>  server/reds.c                | 13 -------------
>  server/stat.h                |  1 -
>  4 files changed, 18 deletions(-)
> 
> Not to mention that the computation was wrong!

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Christophe


> 
> diff --git a/server/main-channel-client.c b/server/main-channel-client.c
> index 693e832..2390784 100644
> --- a/server/main-channel-client.c
> +++ b/server/main-channel-client.c
> @@ -393,9 +393,6 @@ void main_channel_client_handle_pong(MainChannelClient *mcc, SpiceMsgPing *ping,
>           * channel client monitors the connectivity using ping-pong messages
>           */
>          red_channel_client_handle_message(rcc, size, SPICE_MSGC_PONG, ping);
> -#ifdef RED_STATISTICS
> -        stat_update_value(red_channel_client_get_channel(rcc)->reds, roundtrip);
> -#endif
>          return;
>      }
>  
> diff --git a/server/reds-private.h b/server/reds-private.h
> index a044a57..36ef6c0 100644
> --- a/server/reds-private.h
> +++ b/server/reds-private.h
> @@ -140,7 +140,6 @@ struct RedsState {
>      char *stat_shm_name;
>      SpiceStat *stat;
>      pthread_mutex_t stat_lock;
> -    RedsStatValue roundtrip_stat;
>  #endif
>      int allow_multiple_clients;
>  
> diff --git a/server/reds.c b/server/reds.c
> index 274c393..79e337b 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -451,19 +451,6 @@ void stat_remove_counter(RedsState *reds, uint64_t *counter)
>  {
>      reds_stat_remove(reds, (SpiceStatNode *)(counter - SPICE_OFFSETOF(SpiceStatNode, value)));
>  }
> -
> -void stat_update_value(RedsState *reds, uint32_t value)
> -{
> -    RedsStatValue *stat_value = &reds->roundtrip_stat;
> -
> -    stat_value->value = value;
> -    stat_value->min = (stat_value->count ? MIN(stat_value->min, value) : value);
> -    stat_value->max = MAX(stat_value->max, value);
> -    stat_value->average = (stat_value->average * stat_value->count + value) /
> -                          (stat_value->count + 1);
> -    stat_value->count++;
> -}
> -
>  #endif
>  
>  void reds_register_channel(RedsState *reds, RedChannel *channel)
> diff --git a/server/stat.h b/server/stat.h
> index f6f7a04..7bf90da 100644
> --- a/server/stat.h
> +++ b/server/stat.h
> @@ -31,7 +31,6 @@ StatNodeRef stat_add_node(SpiceServer *reds, StatNodeRef parent, const char *nam
>  void stat_remove_node(SpiceServer *reds, StatNodeRef node);
>  uint64_t *stat_add_counter(SpiceServer *reds, StatNodeRef parent, const char *name, int visible);
>  void stat_remove_counter(SpiceServer *reds, uint64_t *counter);
> -void stat_update_value(SpiceServer *reds, uint32_t value);
>  
>  #define stat_inc_counter(reds, counter, value) {  \
>      if (counter) {                          \
> -- 
> 2.7.4
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]