Removed only written roundtrip_stat field

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-09-26 09:05:25 +01:00
parent 693a6b8fd9
commit ae01c6d4bc
4 changed files with 0 additions and 18 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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)

View File

@ -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) { \