Fix json formatting, fix cmake windows support
This commit is contained in:
parent
ff0d41340b
commit
09e23b61cf
@ -124,7 +124,7 @@ if (NOT CMAKE_CROSSCOMPILING)
|
||||
# Start of .tlo update
|
||||
add_custom_target(configure_tl_parser
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser
|
||||
COMMAND "./configure"
|
||||
COMMAND bash ./configure
|
||||
COMMENT "Configure tl-parser"
|
||||
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
|
||||
)
|
||||
|
@ -965,9 +965,9 @@ void AnimationsManager::memory_cleanup() {
|
||||
animations_.rehash(0);
|
||||
}
|
||||
void AnimationsManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("animations_:"); output.push_back(std::to_string(animations_.size()));
|
||||
output.push_back("\"animations_\":"); output.push_back(std::to_string(animations_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("saved_animation_file_ids_:"); output.push_back(std::to_string(this->saved_animation_file_ids_.size()));
|
||||
output.push_back("\"saved_animation_file_ids_\":"); output.push_back(std::to_string(this->saved_animation_file_ids_.size()));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -280,7 +280,7 @@ void AudiosManager::memory_cleanup() {
|
||||
audios_.rehash(0);
|
||||
}
|
||||
void AudiosManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("animations_:"); output.push_back(std::to_string(audios_.size()));
|
||||
output.push_back("\"animations_\":"); output.push_back(std::to_string(audios_.size()));
|
||||
|
||||
}
|
||||
|
||||
|
@ -14691,108 +14691,110 @@ void ContactsManager::memory_cleanup() {
|
||||
}
|
||||
void ContactsManager::memory_stats(vector<string> &output) {
|
||||
|
||||
output.push_back("users_:"); output.push_back(std::to_string(users_.size()));
|
||||
output.push_back("\"users_\":"); output.push_back(std::to_string(users_.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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("bot_infos_:"); output.push_back(std::to_string(bot_infos_.size()));
|
||||
output.push_back("\"bot_infos_\":"); output.push_back(std::to_string(bot_infos_.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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unknown_users_:"); output.push_back(std::to_string(unknown_users_.size()));
|
||||
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_.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_.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("\"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_.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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unknown_chats_:"); output.push_back(std::to_string(unknown_chats_.size()));
|
||||
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_.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_.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_.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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unknown_channels_:"); output.push_back(std::to_string(unknown_channels_.size()));
|
||||
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_.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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unknown_secret_chats_:"); output.push_back(std::to_string(unknown_secret_chats_.size()));
|
||||
output.push_back("\"unknown_secret_chats_\":"); output.push_back(std::to_string(unknown_secret_chats_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("secret_chats_with_user_:"); output.push_back(std::to_string(secret_chats_with_user_.size()));
|
||||
output.push_back("\"secret_chats_with_user_\":"); output.push_back(std::to_string(secret_chats_with_user_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_invite_links_:"); output.push_back(std::to_string(dialog_invite_links_.size()));
|
||||
output.push_back("\"dialog_invite_links_\":"); output.push_back(std::to_string(dialog_invite_links_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("invite_link_infos_:"); output.push_back(std::to_string(invite_link_infos_.size()));
|
||||
output.push_back("\"invite_link_infos_\":"); output.push_back(std::to_string(invite_link_infos_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_access_by_invite_link_:"); output.push_back(std::to_string(dialog_access_by_invite_link_.size()));
|
||||
output.push_back("\"dialog_access_by_invite_link_\":"); output.push_back(std::to_string(dialog_access_by_invite_link_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_user_from_database_queries_:"); output.push_back(std::to_string(load_user_from_database_queries_.size()));
|
||||
output.push_back("\"load_user_from_database_queries_\":"); output.push_back(std::to_string(load_user_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("loaded_from_database_users_:"); output.push_back(std::to_string(loaded_from_database_users_.size()));
|
||||
output.push_back("\"loaded_from_database_users_\":"); output.push_back(std::to_string(loaded_from_database_users_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unavailable_user_fulls_:"); output.push_back(std::to_string(unavailable_user_fulls_.size()));
|
||||
output.push_back("\"unavailable_user_fulls_\":"); output.push_back(std::to_string(unavailable_user_fulls_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unavailable_bot_infos_:"); output.push_back(std::to_string(unavailable_bot_infos_.size()));
|
||||
output.push_back("\"unavailable_bot_infos_\":"); output.push_back(std::to_string(unavailable_bot_infos_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_chat_from_database_queries_:"); output.push_back(std::to_string(load_chat_from_database_queries_.size()));
|
||||
output.push_back("\"load_chat_from_database_queries_\":"); output.push_back(std::to_string(load_chat_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("loaded_from_database_chats_:"); output.push_back(std::to_string(loaded_from_database_chats_.size()));
|
||||
output.push_back("\"loaded_from_database_chats_\":"); output.push_back(std::to_string(loaded_from_database_chats_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unavailable_chat_fulls_:"); output.push_back(std::to_string(unavailable_chat_fulls_.size()));
|
||||
output.push_back("\"unavailable_chat_fulls_\":"); output.push_back(std::to_string(unavailable_chat_fulls_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_channel_from_database_queries_:"); output.push_back(std::to_string(load_channel_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("loaded_from_database_channels_:"); output.push_back(std::to_string(loaded_from_database_channels_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("unavailable_channel_fulls_:"); output.push_back(std::to_string(unavailable_channel_fulls_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_secret_chat_from_database_queries_:"); output.push_back(std::to_string(load_secret_chat_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("loaded_from_database_secret_chats_:"); output.push_back(std::to_string(loaded_from_database_secret_chats_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_administrators_:"); output.push_back(std::to_string(dialog_administrators_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("uploaded_profile_photos_:"); output.push_back(std::to_string(uploaded_profile_photos_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("imported_contacts_:"); output.push_back(std::to_string(imported_contacts_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("received_channel_participant_:"); output.push_back(std::to_string(received_channel_participant_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("received_channel_participants_:"); output.push_back(std::to_string(received_channel_participants_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("cached_channel_participants_:"); output.push_back(std::to_string(cached_channel_participants_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_contacts_queries_:"); output.push_back(std::to_string(load_contacts_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_imported_contacts_queries_:"); output.push_back(std::to_string(load_imported_contacts_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("all_imported_contacts_:"); output.push_back(std::to_string(all_imported_contacts_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("users_nearby_:"); output.push_back(std::to_string(users_nearby_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("channels_nearby_:"); output.push_back(std::to_string(channels_nearby_.size()));
|
||||
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(",");
|
||||
output.push_back("restricted_user_ids_:"); output.push_back(std::to_string(restricted_user_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("restricted_channel_ids_:"); output.push_back(std::to_string(restricted_channel_ids_.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("imported_contact_user_ids_:"); output.push_back(std::to_string(imported_contact_user_ids_.size()));
|
||||
output.push_back("unimported_contact_invites_:"); output.push_back(std::to_string(unimported_contact_invites_.size()));
|
||||
output.push_back("\"load_channel_from_database_queries_\":"); output.push_back(std::to_string(load_channel_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"loaded_from_database_channels_\":"); output.push_back(std::to_string(loaded_from_database_channels_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"unavailable_channel_fulls_\":"); output.push_back(std::to_string(unavailable_channel_fulls_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"load_secret_chat_from_database_queries_\":"); output.push_back(std::to_string(load_secret_chat_from_database_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"loaded_from_database_secret_chats_\":"); output.push_back(std::to_string(loaded_from_database_secret_chats_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"dialog_administrators_\":"); output.push_back(std::to_string(dialog_administrators_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"uploaded_profile_photos_\":"); output.push_back(std::to_string(uploaded_profile_photos_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"imported_contacts_\":"); output.push_back(std::to_string(imported_contacts_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"received_channel_participant_\":"); output.push_back(std::to_string(received_channel_participant_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"received_channel_participants_\":"); output.push_back(std::to_string(received_channel_participants_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"cached_channel_participants_\":"); output.push_back(std::to_string(cached_channel_participants_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"load_contacts_queries_\":"); output.push_back(std::to_string(load_contacts_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"load_imported_contacts_queries_\":"); output.push_back(std::to_string(load_imported_contacts_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"all_imported_contacts_\":"); output.push_back(std::to_string(all_imported_contacts_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"users_nearby_\":"); output.push_back(std::to_string(users_nearby_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"channels_nearby_\":"); output.push_back(std::to_string(channels_nearby_.size()));
|
||||
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(",");
|
||||
output.push_back("\"restricted_user_ids_\":"); output.push_back(std::to_string(restricted_user_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"restricted_channel_ids_\":"); output.push_back(std::to_string(restricted_channel_ids_.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(",");
|
||||
output.push_back("\"imported_contact_user_ids_\":"); output.push_back(std::to_string(imported_contact_user_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("\"unimported_contact_invites_\":"); output.push_back(std::to_string(unimported_contact_invites_.size()));
|
||||
}
|
||||
} // namespace td
|
||||
|
@ -696,7 +696,7 @@ void DocumentsManager::memory_cleanup() {
|
||||
documents_.rehash(0);
|
||||
}
|
||||
void DocumentsManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("documents_:"); output.push_back(std::to_string(documents_.size()));
|
||||
output.push_back("\"documents_\":"); output.push_back(std::to_string(documents_.size()));
|
||||
}
|
||||
|
||||
string DocumentsManager::get_document_search_text(FileId file_id) const {
|
||||
|
@ -92,29 +92,67 @@ void MemoryManager::get_memory_stats(bool full, Promise<MemoryStats> promise) co
|
||||
return;
|
||||
}
|
||||
|
||||
vector<string> output = {"{memory_stats:["};
|
||||
vector<string> output = {"{\"memory_stats\":{"};
|
||||
|
||||
output.push_back("\"messages_manager_\":[");
|
||||
td_->messages_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->contacts_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->web_pages_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->stickers_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->documents_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->video_notes_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->videos_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->audios_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->animations_manager_->memory_stats(output);
|
||||
output.push_back(",");
|
||||
td_->file_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back("]}");
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"contacts_manager_\":[");
|
||||
td_->contacts_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"web_pages_manager_\":[");
|
||||
td_->web_pages_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"stickers_manager_\":[");
|
||||
td_->stickers_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"documents_manager_\":[");
|
||||
td_->documents_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"video_notes_manager_\":[");
|
||||
td_->video_notes_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"videos_manager_\":[");
|
||||
td_->videos_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"audios_manager_\":[");
|
||||
td_->audios_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"animations_manager_\":[");
|
||||
td_->animations_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back(",");
|
||||
|
||||
output.push_back("\"file_manager_\":[");
|
||||
td_->file_manager_->memory_stats(output);
|
||||
output.push_back("]");
|
||||
|
||||
output.push_back("}}");
|
||||
|
||||
string s = accumulate(output.begin(), output.end(), s);
|
||||
auto value = MemoryStats(s);
|
||||
|
@ -5759,81 +5759,81 @@ void MessagesManager::memory_cleanup() {
|
||||
found_on_server_dialogs_.rehash(0);
|
||||
}
|
||||
void MessagesManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("being_sent_messages_:"); output.push_back(std::to_string(this->being_sent_messages_.size()));
|
||||
output.push_back("\"being_sent_messages_\":"); output.push_back(std::to_string(this->being_sent_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("being_loaded_secret_thumbnails_:"); output.push_back(std::to_string(this->being_loaded_secret_thumbnails_.size()));
|
||||
output.push_back("\"being_loaded_secret_thumbnails_\":"); output.push_back(std::to_string(this->being_loaded_secret_thumbnails_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("being_uploaded_dialog_photos_:"); output.push_back(std::to_string(this->being_uploaded_dialog_photos_.size()));
|
||||
output.push_back("\"being_uploaded_dialog_photos_\":"); output.push_back(std::to_string(this->being_uploaded_dialog_photos_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("being_uploaded_files_:"); output.push_back(std::to_string(this->being_uploaded_files_.size()));
|
||||
output.push_back("\"being_uploaded_files_\":"); output.push_back(std::to_string(this->being_uploaded_files_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("being_uploaded_thumbnails_:"); output.push_back(std::to_string(this->being_uploaded_thumbnails_.size()));
|
||||
output.push_back("\"being_uploaded_thumbnails_\":"); output.push_back(std::to_string(this->being_uploaded_thumbnails_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("active_dialog_actions_:"); output.push_back(std::to_string(this->active_dialog_actions_.size()));
|
||||
output.push_back("\"active_dialog_actions_\":"); output.push_back(std::to_string(this->active_dialog_actions_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("created_dialogs_:"); output.push_back(std::to_string(this->created_dialogs_.size()));
|
||||
output.push_back("\"created_dialogs_\":"); output.push_back(std::to_string(this->created_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_filter_reload_queries_:"); output.push_back(std::to_string(this->dialog_filter_reload_queries_.size()));
|
||||
output.push_back("\"dialog_filter_reload_queries_\":"); output.push_back(std::to_string(this->dialog_filter_reload_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_filters_:"); output.push_back(std::to_string(this->dialog_filters_.size()));
|
||||
output.push_back("\"dialog_filters_\":"); output.push_back(std::to_string(this->dialog_filters_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_folders_:"); output.push_back(std::to_string(this->dialog_folders_.size()));
|
||||
output.push_back("\"dialog_folders_\":"); output.push_back(std::to_string(this->dialog_folders_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("dialog_lists_:"); output.push_back(std::to_string(this->dialog_lists_.size()));
|
||||
output.push_back("\"dialog_lists_\":"); output.push_back(std::to_string(this->dialog_lists_.size()));
|
||||
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("\"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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_blocked_dialogs_:"); output.push_back(std::to_string(this->found_blocked_dialogs_.size()));
|
||||
output.push_back("\"found_blocked_dialogs_\":"); output.push_back(std::to_string(this->found_blocked_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_call_messages_:"); output.push_back(std::to_string(this->found_call_messages_.size()));
|
||||
output.push_back("\"found_call_messages_\":"); output.push_back(std::to_string(this->found_call_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_common_dialogs_:"); output.push_back(std::to_string(this->found_common_dialogs_.size()));
|
||||
output.push_back("\"found_common_dialogs_\":"); output.push_back(std::to_string(this->found_common_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_dialog_messages_:"); output.push_back(std::to_string(this->found_dialog_messages_.size()));
|
||||
output.push_back("\"found_dialog_messages_\":"); output.push_back(std::to_string(this->found_dialog_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_dialog_messages_dialog_id_:"); output.push_back(std::to_string(this->found_dialog_messages_dialog_id_.size()));
|
||||
output.push_back("\"found_dialog_messages_dialog_id_\":"); output.push_back(std::to_string(this->found_dialog_messages_dialog_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_dialog_recent_location_messages_:"); output.push_back(std::to_string(this->found_dialog_recent_location_messages_.size()));
|
||||
output.push_back("\"found_dialog_recent_location_messages_\":"); output.push_back(std::to_string(this->found_dialog_recent_location_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_fts_messages_:"); output.push_back(std::to_string(this->found_fts_messages_.size()));
|
||||
output.push_back("\"found_fts_messages_\":"); output.push_back(std::to_string(this->found_fts_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_message_public_forwards_:"); output.push_back(std::to_string(this->found_message_public_forwards_.size()));
|
||||
output.push_back("\"found_message_public_forwards_\":"); output.push_back(std::to_string(this->found_message_public_forwards_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_messages_:"); output.push_back(std::to_string(this->found_messages_.size()));
|
||||
output.push_back("\"found_messages_\":"); output.push_back(std::to_string(this->found_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_on_server_dialogs_:"); output.push_back(std::to_string(this->found_on_server_dialogs_.size()));
|
||||
output.push_back("\"found_on_server_dialogs_\":"); output.push_back(std::to_string(this->found_on_server_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_public_dialogs_:"); output.push_back(std::to_string(this->found_public_dialogs_.size()));
|
||||
output.push_back("\"found_public_dialogs_\":"); output.push_back(std::to_string(this->found_public_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("loaded_dialogs_:"); output.push_back(std::to_string(this->loaded_dialogs_.size()));
|
||||
output.push_back("\"loaded_dialogs_\":"); output.push_back(std::to_string(this->loaded_dialogs_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("search_public_dialogs_queries_:"); output.push_back(std::to_string(this->search_public_dialogs_queries_.size()));
|
||||
output.push_back("\"search_public_dialogs_queries_\":"); output.push_back(std::to_string(this->search_public_dialogs_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("public_message_links_:"); output.push_back(std::to_string(this->public_message_links_->size()));
|
||||
output.push_back("\"public_message_links_\":"); output.push_back(std::to_string(this->public_message_links_->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_.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("\"get_dialog_message_by_date_results_\":"); output.push_back(std::to_string(this->get_dialog_message_by_date_results_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("get_dialog_query_log_event_id_:"); output.push_back(std::to_string(this->get_dialog_query_log_event_id_.size()));
|
||||
output.push_back("\"get_dialog_query_log_event_id_\":"); output.push_back(std::to_string(this->get_dialog_query_log_event_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("get_channel_difference_to_log_event_id_:"); output.push_back(std::to_string(this->get_channel_difference_to_log_event_id_.size()));
|
||||
output.push_back("\"get_channel_difference_to_log_event_id_\":"); output.push_back(std::to_string(this->get_channel_difference_to_log_event_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("last_clear_history_message_id_to_dialog_id_:"); output.push_back(std::to_string(this->last_clear_history_message_id_to_dialog_id_.size()));
|
||||
output.push_back("\"last_clear_history_message_id_to_dialog_id_\":"); output.push_back(std::to_string(this->last_clear_history_message_id_to_dialog_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("last_outgoing_forwarded_message_date_:"); output.push_back(std::to_string(this->last_outgoing_forwarded_message_date_.size()));
|
||||
output.push_back("\"last_outgoing_forwarded_message_date_\":"); output.push_back(std::to_string(this->last_outgoing_forwarded_message_date_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("load_active_live_location_messages_queries_:"); output.push_back(std::to_string(this->load_active_live_location_messages_queries_.size()));
|
||||
output.push_back("\"load_active_live_location_messages_queries_\":"); output.push_back(std::to_string(this->load_active_live_location_messages_queries_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("message_id_to_dialog_id_:"); output.push_back(std::to_string(this->message_id_to_dialog_id_.size()));
|
||||
output.push_back("\"message_id_to_dialog_id_\":"); output.push_back(std::to_string(this->message_id_to_dialog_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("message_random_ids_:"); output.push_back(std::to_string(this->message_random_ids_.size()));
|
||||
output.push_back("\"message_random_ids_\":"); output.push_back(std::to_string(this->message_random_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("notification_group_id_to_dialog_id_:"); output.push_back(std::to_string(this->notification_group_id_to_dialog_id_.size()));
|
||||
output.push_back("\"notification_group_id_to_dialog_id_\":"); output.push_back(std::to_string(this->notification_group_id_to_dialog_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("previous_repaired_read_inbox_max_message_id_:"); output.push_back(std::to_string(this->previous_repaired_read_inbox_max_message_id_.size()));
|
||||
output.push_back("\"previous_repaired_read_inbox_max_message_id_\":"); output.push_back(std::to_string(this->previous_repaired_read_inbox_max_message_id_.size()));
|
||||
}
|
||||
|
||||
tl_object_ptr<telegram_api::InputPeer> MessagesManager::get_input_peer(DialogId dialog_id,
|
||||
|
@ -6317,33 +6317,33 @@ void StickersManager::memory_cleanup() {
|
||||
dice_messages_.rehash(0);
|
||||
}
|
||||
void StickersManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("found_stickers_:"); output.push_back(std::to_string(found_stickers_.size()));
|
||||
output.push_back("\"found_stickers_\":"); output.push_back(std::to_string(found_stickers_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("found_sticker_sets_:"); output.push_back(std::to_string(found_sticker_sets_.size()));
|
||||
output.push_back("\"found_sticker_sets_\":"); output.push_back(std::to_string(found_sticker_sets_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("archived_sticker_set_ids_:"); output.push_back(std::to_string(archived_sticker_set_ids_->size()));
|
||||
output.push_back("\"archived_sticker_set_ids_\":"); output.push_back(std::to_string(archived_sticker_set_ids_->size()));
|
||||
output.push_back(",");
|
||||
output.push_back("attached_sticker_sets_:"); output.push_back(std::to_string(attached_sticker_sets_.size()));
|
||||
output.push_back("\"attached_sticker_sets_\":"); output.push_back(std::to_string(attached_sticker_sets_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("favorite_sticker_file_ids_:"); output.push_back(std::to_string(favorite_sticker_file_ids_.size()));
|
||||
output.push_back("\"favorite_sticker_file_ids_\":"); output.push_back(std::to_string(favorite_sticker_file_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("favorite_sticker_ids_:"); output.push_back(std::to_string(favorite_sticker_ids_.size()));
|
||||
output.push_back("\"favorite_sticker_ids_\":"); output.push_back(std::to_string(favorite_sticker_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("featured_sticker_set_ids_:"); output.push_back(std::to_string(featured_sticker_set_ids_.size()));
|
||||
output.push_back("\"featured_sticker_set_ids_\":"); output.push_back(std::to_string(featured_sticker_set_ids_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("installed_sticker_set_ids_:"); output.push_back(std::to_string(installed_sticker_set_ids_->size()));
|
||||
output.push_back("\"installed_sticker_set_ids_\":"); output.push_back(std::to_string(installed_sticker_set_ids_->size()));
|
||||
output.push_back(",");
|
||||
output.push_back("recent_sticker_file_ids_:"); output.push_back(std::to_string(recent_sticker_file_ids_->size()));
|
||||
output.push_back("\"recent_sticker_file_ids_\":"); output.push_back(std::to_string(recent_sticker_file_ids_->size()));
|
||||
output.push_back(",");
|
||||
output.push_back("recent_sticker_ids_:"); output.push_back(std::to_string(recent_sticker_ids_->size()));
|
||||
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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("special_sticker_sets_:"); output.push_back(std::to_string(special_sticker_sets_.size()));
|
||||
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_.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_.size()));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -251,7 +251,7 @@ void VideoNotesManager::memory_cleanup() {
|
||||
video_notes_.rehash(0);
|
||||
}
|
||||
void VideoNotesManager::memory_stats(vector<string> &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_.size()));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -330,7 +330,7 @@ void VideosManager::memory_cleanup() {
|
||||
videos_.rehash(0);
|
||||
}
|
||||
void VideosManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("videos_:"); output.push_back(std::to_string(videos_.size()));
|
||||
output.push_back("\"videos_\":"); output.push_back(std::to_string(videos_.size()));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -1776,17 +1776,17 @@ void WebPagesManager::memory_cleanup() {
|
||||
url_to_file_source_id_.rehash(0);
|
||||
}
|
||||
void WebPagesManager::memory_stats(vector<string> &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_.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("\"loaded_from_database_web_pages_\":"); output.push_back(std::to_string(loaded_from_database_web_pages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("web_page_messages_:"); output.push_back(std::to_string(web_page_messages_.size()));
|
||||
output.push_back("\"web_page_messages_\":"); output.push_back(std::to_string(web_page_messages_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("got_web_page_previews_:"); output.push_back(std::to_string(got_web_page_previews_.size()));
|
||||
output.push_back("\"got_web_page_previews_\":"); output.push_back(std::to_string(got_web_page_previews_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("url_to_web_page_id_:"); output.push_back(std::to_string(url_to_web_page_id_.size()));
|
||||
output.push_back("\"url_to_web_page_id_\":"); output.push_back(std::to_string(url_to_web_page_id_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("url_to_file_source_id_:"); output.push_back(std::to_string(url_to_file_source_id_.size()));
|
||||
output.push_back("\"url_to_file_source_id_\":"); output.push_back(std::to_string(url_to_file_source_id_.size()));
|
||||
|
||||
}
|
||||
} // namespace td
|
||||
|
@ -4150,15 +4150,15 @@ void FileManager::memory_cleanup() {
|
||||
LOG(ERROR) << "Final registered ids: " << file_id_info_.size() << " registered nodes: " << file_nodes_.size();
|
||||
}
|
||||
void FileManager::memory_stats(vector<string> &output) {
|
||||
output.push_back("file_id_info_:"); output.push_back(std::to_string(file_id_info_.size()));
|
||||
output.push_back("\"file_id_info_\":"); output.push_back(std::to_string(file_id_info_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("file_nodes_:"); output.push_back(std::to_string(file_nodes_.size()));
|
||||
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_.size()));
|
||||
output.push_back(",");
|
||||
output.push_back("file_id_seqno:"); output.push_back(std::to_string(file_id_seqno));
|
||||
output.push_back("\"file_id_seqno\":"); output.push_back(std::to_string(file_id_seqno));
|
||||
output.push_back(",");
|
||||
output.push_back("file_node_seqno:"); output.push_back(std::to_string(file_node_seqno));
|
||||
output.push_back("\"file_node_seqno\":"); output.push_back(std::to_string(file_node_seqno));
|
||||
}
|
||||
|
||||
void FileManager::tear_down() {
|
||||
|
Loading…
Reference in New Issue
Block a user