diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index 6c29eaf5b..f132e0e47 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -890,7 +890,7 @@ void AnimationsManager::get_current_state(vector &output) { - output.push_back("\"animations_\":"); output.push_back(std::to_string(animations_.size())); + output.push_back("\"animations_\":"); output.push_back(std::to_string(animations_.calc_size())); output.push_back(","); output.push_back("\"saved_animation_ids_\":"); output.push_back(std::to_string(this->saved_animation_ids_.size())); output.push_back(","); diff --git a/td/telegram/AudiosManager.cpp b/td/telegram/AudiosManager.cpp index 13b8f6a19..38f8e1d99 100644 --- a/td/telegram/AudiosManager.cpp +++ b/td/telegram/AudiosManager.cpp @@ -308,7 +308,7 @@ tl_object_ptr AudiosManager::get_input_media( } void AudiosManager::memory_stats(vector &output) { - output.push_back("\"audios_\":"); output.push_back(std::to_string(audios_.size())); + output.push_back("\"audios_\":"); output.push_back(std::to_string(audios_.calc_size())); } diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 42fdf24ed..bf6d4d6e4 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -17898,39 +17898,39 @@ void ContactsManager::get_current_state(vector &output) { - output.push_back("\"users_\":"); output.push_back(std::to_string(users_.size())); + output.push_back("\"users_\":"); output.push_back(std::to_string(users_.calc_size())); output.push_back(","); - output.push_back("\"users_full_\":"); output.push_back(std::to_string(users_full_.size())); + output.push_back("\"users_full_\":"); output.push_back(std::to_string(users_full_.calc_size())); output.push_back(","); - output.push_back("\"user_photos_\":"); output.push_back(std::to_string(user_photos_.size())); + output.push_back("\"user_photos_\":"); output.push_back(std::to_string(user_photos_.calc_size())); output.push_back(","); output.push_back("\"unknown_users_\":"); output.push_back(std::to_string(unknown_users_.size())); output.push_back(","); - output.push_back("\"pending_user_photos_\":"); output.push_back(std::to_string(pending_user_photos_.size())); + output.push_back("\"pending_user_photos_\":"); output.push_back(std::to_string(pending_user_photos_.calc_size())); output.push_back(","); - output.push_back("\"user_profile_photo_file_source_ids_\":"); output.push_back(std::to_string(user_profile_photo_file_source_ids_.size())); + output.push_back("\"user_profile_photo_file_source_ids_\":"); output.push_back(std::to_string(user_profile_photo_file_source_ids_.calc_size())); output.push_back(","); output.push_back("\"my_photo_file_id_\":"); output.push_back(std::to_string(my_photo_file_id_.size())); output.push_back(","); - output.push_back("\"chats_\":"); output.push_back(std::to_string(chats_.size())); + output.push_back("\"chats_\":"); output.push_back(std::to_string(chats_.calc_size())); output.push_back(","); - output.push_back("\"chats_full_\":"); output.push_back(std::to_string(chats_full_.size())); + output.push_back("\"chats_full_\":"); output.push_back(std::to_string(chats_full_.calc_size())); output.push_back(","); output.push_back("\"unknown_chats_\":"); output.push_back(std::to_string(unknown_chats_.size())); output.push_back(","); - output.push_back("\"chat_full_file_source_ids_\":"); output.push_back(std::to_string(chat_full_file_source_ids_.size())); + output.push_back("\"chat_full_file_source_ids_\":"); output.push_back(std::to_string(chat_full_file_source_ids_.calc_size())); output.push_back(","); - output.push_back("\"min_channels_\":"); output.push_back(std::to_string(min_channels_.size())); + output.push_back("\"min_channels_\":"); output.push_back(std::to_string(min_channels_.calc_size())); output.push_back(","); - output.push_back("\"channels_\":"); output.push_back(std::to_string(channels_.size())); + output.push_back("\"channels_\":"); output.push_back(std::to_string(channels_.calc_size())); output.push_back(","); - output.push_back("\"channels_full_\":"); output.push_back(std::to_string(channels_full_.size())); + output.push_back("\"channels_full_\":"); output.push_back(std::to_string(channels_full_.calc_size())); output.push_back(","); output.push_back("\"unknown_channels_\":"); output.push_back(std::to_string(unknown_channels_.size())); output.push_back(","); - output.push_back("\"channel_full_file_source_ids_\":"); output.push_back(std::to_string(channel_full_file_source_ids_.size())); + output.push_back("\"channel_full_file_source_ids_\":"); output.push_back(std::to_string(channel_full_file_source_ids_.calc_size())); output.push_back(","); - output.push_back("\"secret_chats_\":"); output.push_back(std::to_string(secret_chats_.size())); + output.push_back("\"secret_chats_\":"); output.push_back(std::to_string(secret_chats_.calc_size())); output.push_back(","); output.push_back("\"unknown_secret_chats_\":"); output.push_back(std::to_string(unknown_secret_chats_.size())); output.push_back(","); @@ -17982,11 +17982,11 @@ void ContactsManager::memory_stats(vector &output) { output.push_back(","); output.push_back("\"all_users_nearby_\":"); output.push_back(std::to_string(all_users_nearby_.size())); output.push_back(","); - output.push_back("\"linked_channel_ids_\":"); output.push_back(std::to_string(linked_channel_ids_.size())); + output.push_back("\"linked_channel_ids_\":"); output.push_back(std::to_string(linked_channel_ids_.calc_size())); output.push_back(","); - output.push_back("\"restricted_user_ids_\":"); output.push_back(std::to_string(restricted_user_ids_.size())); + output.push_back("\"restricted_user_ids_\":"); output.push_back(std::to_string(restricted_user_ids_.calc_size())); output.push_back(","); - output.push_back("\"restricted_channel_ids_\":"); output.push_back(std::to_string(restricted_channel_ids_.size())); + output.push_back("\"restricted_channel_ids_\":"); output.push_back(std::to_string(restricted_channel_ids_.calc_size())); output.push_back(","); output.push_back("\"next_all_imported_contacts_\":"); output.push_back(std::to_string(next_all_imported_contacts_.size())); output.push_back(","); diff --git a/td/telegram/DocumentsManager.cpp b/td/telegram/DocumentsManager.cpp index eec6fc95f..ff4d3bb3a 100644 --- a/td/telegram/DocumentsManager.cpp +++ b/td/telegram/DocumentsManager.cpp @@ -729,7 +729,7 @@ void DocumentsManager::merge_documents(FileId new_id, FileId old_id) { } void DocumentsManager::memory_stats(vector &output) { - output.push_back("\"documents_\":"); output.push_back(std::to_string(documents_.size())); + output.push_back("\"documents_\":"); output.push_back(std::to_string(documents_.calc_size())); } string DocumentsManager::get_document_search_text(FileId file_id) const { diff --git a/td/telegram/FileReferenceManager.cpp b/td/telegram/FileReferenceManager.cpp index 038fc6d5f..438b5ec1e 100644 --- a/td/telegram/FileReferenceManager.cpp +++ b/td/telegram/FileReferenceManager.cpp @@ -473,7 +473,7 @@ td_api::object_ptr FileReferenceManager::get_message_object(Fil } void FileReferenceManager::memory_stats(vector &output) { - output.push_back("\"nodes_\":"); output.push_back(std::to_string(nodes_.size())); + output.push_back("\"nodes_\":"); output.push_back(std::to_string(nodes_.calc_size())); output.push_back(","); output.push_back("\"file_sources_\":"); output.push_back(std::to_string(file_sources_.size())); } diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 6b8c82837..1f7dd8c19 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -6464,7 +6464,7 @@ void MessagesManager::memory_stats(vector &output) { output.push_back(","); output.push_back("\"dialog_online_member_counts_\":"); output.push_back(std::to_string(this->dialog_online_member_counts_.size())); output.push_back(","); - output.push_back("\"dialogs_\":"); output.push_back(std::to_string(this->dialogs_.size())); + output.push_back("\"dialogs_\":"); output.push_back(std::to_string(this->dialogs_.calc_size())); output.push_back(","); output.push_back("\"found_call_messages_\":"); output.push_back(std::to_string(this->found_call_messages_.size())); output.push_back(","); @@ -6498,7 +6498,7 @@ void MessagesManager::memory_stats(vector &output) { output.push_back(","); output.push_back("\"message_embedding_codes_\":"); output.push_back(std::to_string(this->message_embedding_codes_->size())); output.push_back(","); - output.push_back("\"full_message_id_to_file_source_id_\":"); output.push_back(std::to_string(this->full_message_id_to_file_source_id_.size())); + output.push_back("\"full_message_id_to_file_source_id_\":"); output.push_back(std::to_string(this->full_message_id_to_file_source_id_.calc_size())); output.push_back(","); output.push_back("\"get_dialog_message_by_date_results_\":"); output.push_back(std::to_string(this->get_dialog_message_by_date_results_.size())); output.push_back(","); diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 0bcdf959a..e0de83426 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -1859,7 +1859,7 @@ void PollManager::on_binlog_events(vector &&events) { } void PollManager::memory_stats(vector &output) { - output.push_back("\"polls_\":"); output.push_back(std::to_string(polls_.size())); + output.push_back("\"polls_\":"); output.push_back(std::to_string(polls_.calc_size())); output.push_back(","); output.push_back("\"pending_answers_\":"); output.push_back(std::to_string(pending_answers_.size())); output.push_back(","); diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index cd97bf40e..91dc59ef4 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -9544,13 +9544,13 @@ void StickersManager::memory_stats(vector &output) { output.push_back(","); output.push_back("\"recent_sticker_ids_\":"); output.push_back(std::to_string(recent_sticker_ids_->size())); output.push_back(","); - output.push_back("\"short_name_to_sticker_set_id_\":"); output.push_back(std::to_string(short_name_to_sticker_set_id_.size())); + output.push_back("\"short_name_to_sticker_set_id_\":"); output.push_back(std::to_string(short_name_to_sticker_set_id_.calc_size())); output.push_back(","); output.push_back("\"special_sticker_sets_\":"); output.push_back(std::to_string(special_sticker_sets_.size())); output.push_back(","); - output.push_back("\"sticker_sets_\":"); output.push_back(std::to_string(sticker_sets_.size())); + output.push_back("\"sticker_sets_\":"); output.push_back(std::to_string(sticker_sets_.calc_size())); output.push_back(","); - output.push_back("\"stickers_\":"); output.push_back(std::to_string(stickers_.size())); + output.push_back("\"stickers_\":"); output.push_back(std::to_string(stickers_.calc_size())); } } // namespace td diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index 8540aae9c..e5d79b6f9 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -367,7 +367,7 @@ tl_object_ptr VideoNotesManager::get_input_media( } void VideoNotesManager::memory_stats(vector &output) { - output.push_back("\"video_notes_\":"); output.push_back(std::to_string(video_notes_.size())); + output.push_back("\"video_notes_\":"); output.push_back(std::to_string(video_notes_.calc_size())); } } // namespace td diff --git a/td/telegram/VideosManager.cpp b/td/telegram/VideosManager.cpp index 8f7df7632..941892aac 100644 --- a/td/telegram/VideosManager.cpp +++ b/td/telegram/VideosManager.cpp @@ -298,7 +298,7 @@ string VideosManager::get_video_search_text(FileId file_id) const { } void VideosManager::memory_stats(vector &output) { - output.push_back("\"videos_\":"); output.push_back(std::to_string(videos_.size())); + output.push_back("\"videos_\":"); output.push_back(std::to_string(videos_.calc_size())); } } // namespace td diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index c677b6fbc..fd74ccd65 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -1781,7 +1781,7 @@ vector WebPagesManager::get_web_page_file_ids(const WebPage *web_page) c } void WebPagesManager::memory_stats(vector &output) { - output.push_back("\"web_pages_\":"); output.push_back(std::to_string(web_pages_.size())); + output.push_back("\"web_pages_\":"); output.push_back(std::to_string(web_pages_.calc_size())); output.push_back(","); output.push_back("\"loaded_from_database_web_pages_\":"); output.push_back(std::to_string(loaded_from_database_web_pages_.size())); output.push_back(","); diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index a3590fad4..3d3023669 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -4092,7 +4092,7 @@ void FileManager::memory_stats(vector &output) { output.push_back(","); output.push_back("\"file_nodes_\":"); output.push_back(std::to_string(file_nodes_.size())); output.push_back(","); - output.push_back("\"file_hash_to_file_id_\":"); output.push_back(std::to_string(file_hash_to_file_id_.size())); + output.push_back("\"file_hash_to_file_id_\":"); output.push_back(std::to_string(file_hash_to_file_id_.calc_size())); output.push_back(","); output.push_back("\"empty_file_ids_\":"); output.push_back(std::to_string(empty_file_ids_.size())); output.push_back(",");