mirror of
https://github.com/basiliscos/syncspirit.git
synced 2026-05-02 17:42:26 +00:00
fltk: add 'stats_interval' option
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
- dynamically apply config changes
|
||||
|
||||
## fltk
|
||||
|
||||
- fltk/core show % of availability
|
||||
- add localization support
|
||||
- put app into system tray somehow (win32, linux)
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ auto reflect(const main_cfg_t &config, const main_cfg_t &default_config) -> cate
|
||||
property_ptr_t(new bep::rx_timeout_t(bep.rx_timeout, bep_def.rx_timeout)),
|
||||
property_ptr_t(new bep::tx_buff_limit_t(bep.tx_buff_limit, bep_def.tx_buff_limit)),
|
||||
property_ptr_t(new bep::tx_timeout_t(bep.tx_timeout, bep_def.tx_timeout)),
|
||||
property_ptr_t(new bep::stats_interval_t(bep.stats_interval, bep_def.stats_interval)),
|
||||
// clang-format on
|
||||
};
|
||||
return new category_t("bep", "BEP protocol/network settings", std::move(props));
|
||||
|
||||
@@ -158,6 +158,13 @@ void tx_timeout_t::reflect_to(syncspirit::config::main_t &main) { main.bep_confi
|
||||
|
||||
const char *tx_timeout_t::explanation_ = "tx max time, milliseconds";
|
||||
|
||||
stats_interval_t::stats_interval_t(std::uint64_t value, std::uint64_t default_value)
|
||||
: parent_t("tx_timeout", explanation_, value, default_value) {}
|
||||
|
||||
void stats_interval_t::reflect_to(syncspirit::config::main_t &main) { main.bep_config.stats_interval = native_value; }
|
||||
|
||||
const char *stats_interval_t::explanation_ = "min delay before gathering I/O stats, milliseconds";
|
||||
|
||||
} // namespace bep
|
||||
|
||||
namespace db {
|
||||
|
||||
@@ -136,6 +136,15 @@ struct tx_timeout_t final : impl::positive_integer_t {
|
||||
void reflect_to(syncspirit::config::main_t &main) override;
|
||||
};
|
||||
|
||||
struct stats_interval_t final : impl::positive_integer_t {
|
||||
using parent_t = impl::positive_integer_t;
|
||||
|
||||
static const char *explanation_;
|
||||
|
||||
stats_interval_t(std::uint64_t value, std::uint64_t default_value);
|
||||
void reflect_to(syncspirit::config::main_t &main) override;
|
||||
};
|
||||
|
||||
} // namespace bep
|
||||
|
||||
namespace db {
|
||||
|
||||
Reference in New Issue
Block a user