File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#define MAX_TRANSACTIONS 4096
5
5
6
- #define BUFFER_SIZE (64 * 1024)
6
+ #define BUFFER_SIZE (256 * 1024)
7
7
#define LISTEN_QUEUE_SIZE 100
8
8
#define MAX_STREAMS 4096
9
9
Original file line number Diff line number Diff line change @@ -128,6 +128,9 @@ bool server_start(server_t server) {
128
128
return true;
129
129
}
130
130
131
+ long sent_messages ;
132
+ long sent_bytes ;
133
+
131
134
static bool stream_flush (stream_t stream ) {
132
135
int tosend = stream -> output .ready ;
133
136
if (tosend == 0 ) {
@@ -138,12 +141,14 @@ static bool stream_flush(stream_t stream) {
138
141
char * cursor = stream -> output .data ;
139
142
while (tosend > 0 ) {
140
143
// repeat sending until we send everything
141
- int sent = send (stream -> fd , cursor , tosend , 0 );
144
+ int sent = send (stream -> fd , cursor , tosend , 0 );
142
145
if (sent == -1 ) {
143
146
shout ("failed to flush the stream\n" );
144
147
stream -> good = false;
145
148
return false;
146
149
}
150
+ sent_messages += 1 ;
151
+ sent_bytes += sent ;
147
152
cursor += sent ;
148
153
tosend -= sent ;
149
154
assert (tosend >= 0 );
You can’t perform that action at this time.
0 commit comments