Fix singular usages of "statistics".
This commit is contained in:
parent
e58847a5fb
commit
f03ffe1d31
@ -41,7 +41,7 @@ static std::atomic<std::size_t> total_memory_used;
|
||||
void register_xalloc(malloc_info *info, std::int32_t diff) {
|
||||
my_assert(info->size >= 0);
|
||||
// TODO: this is very slow in case of several threads.
|
||||
// Currently this statistics is intended only for memory benchmarks.
|
||||
// Currently, the statistics are intended only for memory benchmarks.
|
||||
total_memory_used.fetch_add(diff * info->size, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
|
@ -8451,7 +8451,7 @@ void ContactsManager::get_channel_statistics_dc_id_impl(ChannelId channel_id, bo
|
||||
}
|
||||
|
||||
if (!channel_full->stats_dc_id.is_exact() || (for_full_statistics && !channel_full->can_view_statistics)) {
|
||||
return promise.set_error(Status::Error(400, "Chat statistics is not available"));
|
||||
return promise.set_error(Status::Error(400, "Chat statistics are not available"));
|
||||
}
|
||||
|
||||
promise.set_value(DcId(channel_full->stats_dc_id));
|
||||
|
@ -417,7 +417,7 @@ void StatisticsManager::send_get_channel_message_stats_query(
|
||||
return promise.set_error(Status::Error(400, "Message not found"));
|
||||
}
|
||||
if (!td_->messages_manager_->can_get_message_statistics(message_full_id)) {
|
||||
return promise.set_error(Status::Error(400, "Message statistics is inaccessible"));
|
||||
return promise.set_error(Status::Error(400, "Message statistics are inaccessible"));
|
||||
}
|
||||
CHECK(dialog_id.get_type() == DialogType::Channel);
|
||||
td_->create_handler<GetMessageStatsQuery>(std::move(promise))
|
||||
|
@ -4964,10 +4964,10 @@ void Td::on_request(uint64 id, td_api::optimizeStorage &request) {
|
||||
|
||||
void Td::on_request(uint64 id, td_api::getNetworkStatistics &request) {
|
||||
if (net_stats_manager_.empty()) {
|
||||
return send_error_raw(id, 400, "Network statistics is disabled");
|
||||
return send_error_raw(id, 400, "Network statistics are disabled");
|
||||
}
|
||||
if (!request.only_current_ && G()->get_option_boolean("disable_persistent_network_statistics")) {
|
||||
return send_error_raw(id, 400, "Persistent network statistics is disabled");
|
||||
return send_error_raw(id, 400, "Persistent network statistics are disabled");
|
||||
}
|
||||
CREATE_REQUEST_PROMISE();
|
||||
auto query_promise = PromiseCreator::lambda([promise = std::move(promise)](Result<NetworkStats> result) mutable {
|
||||
@ -4983,7 +4983,7 @@ void Td::on_request(uint64 id, td_api::getNetworkStatistics &request) {
|
||||
|
||||
void Td::on_request(uint64 id, td_api::resetNetworkStatistics &request) {
|
||||
if (net_stats_manager_.empty()) {
|
||||
return send_error_raw(id, 400, "Network statistics is disabled");
|
||||
return send_error_raw(id, 400, "Network statistics are disabled");
|
||||
}
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
send_closure(net_stats_manager_, &NetStatsManager::reset_network_stats);
|
||||
@ -4995,7 +4995,7 @@ void Td::on_request(uint64 id, td_api::addNetworkStatistics &request) {
|
||||
return send_error_raw(id, 400, "Network statistics entry must be non-empty");
|
||||
}
|
||||
if (net_stats_manager_.empty()) {
|
||||
return send_error_raw(id, 400, "Network statistics is disabled");
|
||||
return send_error_raw(id, 400, "Network statistics are disabled");
|
||||
}
|
||||
|
||||
NetworkStatsEntry entry;
|
||||
|
Loading…
Reference in New Issue
Block a user