Feat/admin#22
Merged
Merged
Conversation
- Introduced `NetworkStats` struct to track detailed network performance metrics. - Added `getStats` method to compute and retrieve statistics, including packet and page counts, delivery, and drop rates. - Updated constants in `Network` class to improve clarity and maintainability.
- Added `Admin` class to provide administrative functions, including generating network performance reports and running simulations with periodic reporting. - Implemented `printReport` method for detailed statistical output of network metrics. - Added `runFor` method to advance the simulation with configurable tick count and reporting intervals.
…control and reporting - Replaced `structures/list.h` include with `core/Admin.h`. - Added `Admin` object to manage the simulation. - Incorporated `runFor` and `printReport` methods to execute simulation and display final report.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
Adminclass to manage and report on the network simulation, adds a comprehensive statistics structure, and integrates periodic and final reporting into the simulation workflow. The most important changes are grouped below:Administrative and Reporting Features
Adminclass (Admin.h,Admin.cpp) to provide administrative functions for monitoring, controlling, and reporting on the network simulation. The class can run the simulation for a specified number of ticks and print detailed reports at intervals or at the end. [1] [2]main.cppto use the newAdminclass, running the simulation for 100 ticks with periodic reporting every 10 ticks and a final summary.Network Statistics and Metrics
NetworkStatsstructure inNetwork.h, encapsulating detailed network metrics such as router/terminal counts, packet/page statistics, and delivery/drop/success rates, with utility methods for calculating these rates.Network::getStats()method to aggregate statistics from routers and terminals, supporting the new reporting functionality. [1] [2]Minor Improvements and Cleanups
Networkfromsize_ttouint8_tfor more appropriate type usage.dummy.cpp.Network.h. [1] [2]