more tests with varying window and payload sizes
This commit is contained in:
parent
639bf0120e
commit
dc6a31a151
62659
res/test1/test1_delays_1656262285_tcp_window_inc_every_100.csv
Normal file
62659
res/test1/test1_delays_1656262285_tcp_window_inc_every_100.csv
Normal file
File diff suppressed because it is too large
Load Diff
65526
res/test1/test1_delays_1656341829_tcp.csv
Normal file
65526
res/test1/test1_delays_1656341829_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
28440
res/test1/test1_delays_1656342846_tcp.csv
Normal file
28440
res/test1/test1_delays_1656342846_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
42429
res/test1/test1_delays_1656343364_tcp.csv
Normal file
42429
res/test1/test1_delays_1656343364_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
65491
res/test1/test1_delays_1656343705_tcp.csv
Normal file
65491
res/test1/test1_delays_1656343705_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
65457
res/test1/test1_delays_1656343988_tcp.csv
Normal file
65457
res/test1/test1_delays_1656343988_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
48782
res/test1/test1_delays_1656344281_tcp.csv
Normal file
48782
res/test1/test1_delays_1656344281_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
60312
res/test1/test1_delays_1656344547_tcp.csv
Normal file
60312
res/test1/test1_delays_1656344547_tcp.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -102,8 +102,8 @@ class ToxService {
|
|||||||
DHT_node nodes[] =
|
DHT_node nodes[] =
|
||||||
{
|
{
|
||||||
// own bootsrap node, to reduce load
|
// own bootsrap node, to reduce load
|
||||||
//{"tox.plastiras.org", 33445, "8E8B63299B3D520FB377FE5100E65E3322F7AE5B20A0ACED2981769FC5B43725", {}}, // 14
|
{"tox.plastiras.org", 33445, "8E8B63299B3D520FB377FE5100E65E3322F7AE5B20A0ACED2981769FC5B43725", {}}, // 14
|
||||||
{"tox2.plastiras.org", 33445, "B6626D386BE7E3ACA107B46F48A5C4D522D29281750D44A0CBA6A2721E79C951", {}}, // 14
|
//{"tox2.plastiras.org", 33445, "B6626D386BE7E3ACA107B46F48A5C4D522D29281750D44A0CBA6A2721E79C951", {}}, // 14
|
||||||
};
|
};
|
||||||
|
|
||||||
for (size_t i = 0; i < sizeof(nodes)/sizeof(DHT_node); i ++) {
|
for (size_t i = 0; i < sizeof(nodes)/sizeof(DHT_node); i ++) {
|
||||||
|
@ -11,14 +11,16 @@ class ToxServiceSender : public ToxService {
|
|||||||
|
|
||||||
uint16_t _seq_id {0};
|
uint16_t _seq_id {0};
|
||||||
|
|
||||||
const uint16_t _window_max {100};
|
//const uint16_t _window_max {100};
|
||||||
uint16_t _window {10};
|
uint16_t _window {200};
|
||||||
size_t _max_pkgs_per_iteration {1};
|
//size_t _max_pkgs_per_iteration {1};
|
||||||
|
//size_t _window_increase_counter {0};
|
||||||
|
|
||||||
//const uint16_t _payload_size_min {128};
|
//const uint16_t _payload_size_min {128};
|
||||||
//const uint16_t _payload_size_max {1024};
|
const uint16_t _payload_size_max {1024};
|
||||||
|
|
||||||
//uint16_t _payload_size {0};
|
uint16_t _payload_size {1};
|
||||||
|
size_t _payload_increase_counter {0};
|
||||||
|
|
||||||
struct PKGData {
|
struct PKGData {
|
||||||
uint32_t time_stamp {0};
|
uint32_t time_stamp {0};
|
||||||
@ -82,6 +84,9 @@ class ToxServiceSender : public ToxService {
|
|||||||
uint8_t buffer[max_pkg_size] {200}; // fist byte is tox pkg id
|
uint8_t buffer[max_pkg_size] {200}; // fist byte is tox pkg id
|
||||||
size_t pkg_size {1};
|
size_t pkg_size {1};
|
||||||
|
|
||||||
|
//_window_increase_counter++;
|
||||||
|
_payload_increase_counter++;
|
||||||
|
|
||||||
// seq_id
|
// seq_id
|
||||||
*reinterpret_cast<uint16_t*>(buffer+pkg_size) = _seq_id++;
|
*reinterpret_cast<uint16_t*>(buffer+pkg_size) = _seq_id++;
|
||||||
pkg_size += sizeof(uint16_t);
|
pkg_size += sizeof(uint16_t);
|
||||||
@ -91,6 +96,9 @@ class ToxServiceSender : public ToxService {
|
|||||||
*reinterpret_cast<uint32_t*>(buffer+pkg_size) = time_stamp;
|
*reinterpret_cast<uint32_t*>(buffer+pkg_size) = time_stamp;
|
||||||
pkg_size += sizeof(uint32_t);
|
pkg_size += sizeof(uint32_t);
|
||||||
|
|
||||||
|
// TODO: actually fill with random data, rn its uninit mem
|
||||||
|
pkg_size += _payload_size;
|
||||||
|
|
||||||
Tox_Err_Friend_Custom_Packet e_fcp = TOX_ERR_FRIEND_CUSTOM_PACKET_OK;
|
Tox_Err_Friend_Custom_Packet e_fcp = TOX_ERR_FRIEND_CUSTOM_PACKET_OK;
|
||||||
tox_friend_send_lossy_packet(_tox, *_friend_number, buffer, pkg_size, &e_fcp);
|
tox_friend_send_lossy_packet(_tox, *_friend_number, buffer, pkg_size, &e_fcp);
|
||||||
if (e_fcp != TOX_ERR_FRIEND_CUSTOM_PACKET_OK) {
|
if (e_fcp != TOX_ERR_FRIEND_CUSTOM_PACKET_OK) {
|
||||||
@ -98,17 +106,28 @@ class ToxServiceSender : public ToxService {
|
|||||||
} else {
|
} else {
|
||||||
_pkg_info[_seq_id - 1] = {
|
_pkg_info[_seq_id - 1] = {
|
||||||
time_stamp,
|
time_stamp,
|
||||||
0,
|
_payload_size,
|
||||||
_window
|
_window
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_seq_id == std::numeric_limits<uint16_t>::max()) {
|
||||||
if (_seq_id == std::numeric_limits<uint16_t>::max()) {
|
|
||||||
std::cout << "reached max seq, quitting\n";
|
std::cout << "reached max seq, quitting\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// every 100pkgs increase window by 1
|
||||||
|
if (_window_increase_counter >= 100) {
|
||||||
|
_window_increase_counter = 0;
|
||||||
|
_window++;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// every 100pkgs increase payload by 1
|
||||||
|
if (_payload_increase_counter >= 25 && _payload_size < _payload_size_max) {
|
||||||
|
_payload_increase_counter = 0;
|
||||||
|
_payload_size++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user