summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-11-07 19:44:39 +0200
committerAlon Levy <alevy@redhat.com>2010-11-07 19:44:39 +0200
commit7658d860d669b68a388a3c6bb2d43119d80a7627 (patch)
tree6056682a8f371efec345a14eb6771cdf5c745063
parentceaa2cd0b902240dabd7495bedf2cbff9eb89271 (diff)
downloadspice-7658d860d669b68a388a3c6bb2d43119d80a7627.tar.gz
spice-7658d860d669b68a388a3c6bb2d43119d80a7627.tar.xz
spice-7658d860d669b68a388a3c6bb2d43119d80a7627.zip
server/red_worker: introduce an outgoing struct around out_bytes_counter
-rw-r--r--server/red_worker.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 1e667f96..186bca32 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -390,7 +390,9 @@ struct RedChannel {
release_item_proc release_item;
handle_parsed_proc handle_message;
#ifdef RED_STATISTICS
- uint64_t *out_bytes_counter;
+ struct {
+ uint64_t *out_bytes_counter;
+ } outgoing;
#endif
};
@@ -7380,7 +7382,7 @@ static void red_send_data(RedChannel *channel)
}
} else {
channel->send_data.pos += n;
- stat_inc_counter(channel->out_bytes_counter, n);
+ stat_inc_counter(channel->outgoing.out_bytes_counter, n);
}
}
}
@@ -9514,7 +9516,7 @@ static void handle_new_display_channel(RedWorker *worker, RedsStreamContext *pee
}
#ifdef RED_STATISTICS
display_channel->stat = stat_add_node(worker->stat, "display_channel", TRUE);
- display_channel->common.base.out_bytes_counter = stat_add_counter(display_channel->stat,
+ display_channel->common.base.outgoing.out_bytes_counter = stat_add_counter(display_channel->stat,
"out_bytes", TRUE);
display_channel->cache_hits_counter = stat_add_counter(display_channel->stat,
"cache_hits", TRUE);
@@ -9640,7 +9642,7 @@ static void red_connect_cursor(RedWorker *worker, RedsStreamContext *peer, int m
}
#ifdef RED_STATISTICS
channel->stat = stat_add_node(worker->stat, "cursor_channel", TRUE);
- channel->common.base.out_bytes_counter = stat_add_counter(channel->stat, "out_bytes", TRUE);
+ channel->common.base.outgoing.out_bytes_counter = stat_add_counter(channel->stat, "out_bytes", TRUE);
#endif
ring_init(&channel->cursor_cache_lru);
channel->cursor_cache_available = CLIENT_CURSOR_CACHE_SIZE;