|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Memory profiling demonstration for Network System. More...
#include <kcenon/network/facade/tcp_facade.h>#include <kcenon/network/interfaces/i_session.h>#include <iostream>#include <iomanip>#include <vector>#include <memory>#include <thread>#include <chrono>#include <string>#include <cstring>#include <map>#include <mutex>
Go to the source code of this file.
Functions | |
| size_t | get_current_rss () |
| Get current RSS (Resident Set Size) in bytes. | |
| size_t | get_virtual_memory () |
| Get current virtual memory size in bytes. | |
| void | print_memory_stats (const std::string &label) |
| Print memory statistics with label. | |
| void | profile_connections (int num_connections) |
| Profile connection memory overhead. | |
| void | profile_message_throughput (int num_messages) |
| Profile message throughput memory. | |
| void | profile_long_running (int duration_seconds) |
| Profile long-running stability. | |
| void | print_usage (const char *program_name) |
| int | main (int argc, char *argv[]) |
Memory profiling demonstration for Network System.
This demo shows how to profile memory usage patterns including:
Definition in file memory_profile_demo.cpp.
| size_t get_current_rss | ( | ) |
Get current RSS (Resident Set Size) in bytes.
Definition at line 41 of file memory_profile_demo.cpp.
Referenced by print_memory_stats(), profile_connections(), profile_long_running(), and profile_message_throughput().

| size_t get_virtual_memory | ( | ) |
Get current virtual memory size in bytes.
Definition at line 63 of file memory_profile_demo.cpp.
Referenced by print_memory_stats().

| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 343 of file memory_profile_demo.cpp.
References print_memory_stats(), print_usage(), profile_connections(), profile_long_running(), and profile_message_throughput().

| void print_memory_stats | ( | const std::string & | label | ) |
Print memory statistics with label.
Definition at line 85 of file memory_profile_demo.cpp.
References get_current_rss(), and get_virtual_memory().
Referenced by main(), profile_connections(), profile_long_running(), and profile_message_throughput().


| void print_usage | ( | const char * | program_name | ) |
Definition at line 331 of file memory_profile_demo.cpp.
Referenced by main().

| void profile_connections | ( | int | num_connections | ) |
Profile connection memory overhead.
Definition at line 97 of file memory_profile_demo.cpp.
References get_current_rss(), and print_memory_stats().
Referenced by main().


| void profile_long_running | ( | int | duration_seconds | ) |
Profile long-running stability.
Definition at line 255 of file memory_profile_demo.cpp.
References get_current_rss(), and print_memory_stats().
Referenced by main().


| void profile_message_throughput | ( | int | num_messages | ) |
Profile message throughput memory.
Definition at line 177 of file memory_profile_demo.cpp.
References get_current_rss(), and print_memory_stats().
Referenced by main().

