VPAAMP-129 Support for collecting network profiling and exporting sta…#1328
Merged
Conversation
…tistics to network persona file, without creating big temporary csv files Reason for change: To generate JSON personas at AAMP runtime Risks: Low Priority: P1 Signed-off-by: Rajat <emailofrajatyadav@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds runtime support for deriving and exporting “network persona” JSON from AAMP’s in-process NetTrace data (VPAAMP-129), removing the need for an external post-processing tool.
Changes:
- Introduces
simnet/net_persona_fitterstatic library to accumulate request/burst trace data and fit a 19-field persona JSON. - Wires NetTrace → NetPersonaFitter accumulation and triggers persona JSON generation on
PrivateInstanceAAMP::Stop()when NetTrace CSV dumping is enabled. - Adds a new L1 unit test suite (
NetPersonaFitterTests) and updates existing unit test targets to linknet_persona_fitter.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Adds simnet subdirectory and links net_persona_fitter into main AAMP dependencies. |
simnet/CMakeLists.txt |
Defines the net_persona_fitter static library target. |
simnet/net_persona_fitter.h |
Declares the singleton fitter API and trace record types. |
simnet/net_persona_fitter.cpp |
Implements fitting/statistics and persona JSON export. |
net_trace.h |
Forwards per-request/per-burst data from NetTrace::FlushCsv() into NetPersonaFitter. |
priv_aamp.cpp |
Generates persona JSON during Stop() when NetTrace CSV dump config is enabled. |
test/utests/CMakeLists.txt |
Ensures net_persona_fitter is available as a linked target for unit tests. |
test/utests/tests/CMakeLists.txt |
Adds the NetPersonaFitterTests subdirectory to the unit test build. |
test/utests/tests/NetPersonaFitterTests/CMakeLists.txt |
Adds a new unit test executable and links it with net_persona_fitter + fakes/gtest. |
test/utests/tests/NetPersonaFitterTests/NetPersonaFitterTests.cpp |
Test runner main() for the new test suite. |
test/utests/tests/NetPersonaFitterTests/NetPersonaFitterTestCases.cpp |
Adds L1 tests validating persona JSON generation from synthetic trace data. |
test/utests/tests/PrivateInstanceAAMP/CMakeLists.txt |
Links net_persona_fitter into this test target (via priv_aamp.cpp dependency chain). |
test/utests/tests/PrivAampTests/CMakeLists.txt |
Links net_persona_fitter into this test target. |
test/utests/tests/PreferredLanguages/CMakeLists.txt |
Links net_persona_fitter into this test target. |
test/utests/tests/AampAbrTests/CMakeLists.txt |
Links net_persona_fitter into this test target. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add NetPersonaFitter::ResetForTesting() (AAMP_TEST_BUILD-guarded) so each unit test starts from a clean singleton state, eliminating order-dependence under --gtest_shuffle or sharding. - Wire ResetForTesting() into NetPersonaFitterTest::SetUp(); remove the now-redundant conditional guard in EmptyDataReturnsFalse. - Narrow FlushCsv() FileState mutex scope to cover only CSV writes; move persona fitter calls outside the lock to avoid unnecessary contention (NetPersonaFitter has its own internal mutex).
Abhi-jith-S
pushed a commit
that referenced
this pull request
May 12, 2026
…es without need to run external tool (#1328) Reason for change: Mechanism added to create JSON persona automatically based on curl profiling. - JSON creation is triggered once stop API is received, - Network Persona utests added. - Add NetPersonaFitter::ResetForTesting() (AAMP_TEST_BUILD-guarded) so each unit test starts from a clean singleton state, eliminating order-dependence under --gtest_shuffle or sharding. - Wire ResetForTesting() into NetPersonaFitterTest::SetUp(); remove the now-redundant conditional guard in EmptyDataReturnsFalse. - Narrow FlushCsv() FileState mutex scope to cover only CSV writes; move persona fitter calls outside the lock to avoid unnecessary contention (NetPersonaFitter has its own internal mutex). Risks: Medium Priority: P1 Signed-off-by: Rajat <emailofrajatyadav@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Rajat <emailofrajatyadav@gmail.com> Co-authored-by: pstroffolino <Philip_Stroffolino@cable.comcast.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
varatharajan568
pushed a commit
that referenced
this pull request
May 20, 2026
…es without need to run external tool (#1328) Reason for change: Mechanism added to create JSON persona automatically based on curl profiling. - JSON creation is triggered once stop API is received, - Network Persona utests added. - Add NetPersonaFitter::ResetForTesting() (AAMP_TEST_BUILD-guarded) so each unit test starts from a clean singleton state, eliminating order-dependence under --gtest_shuffle or sharding. - Wire ResetForTesting() into NetPersonaFitterTest::SetUp(); remove the now-redundant conditional guard in EmptyDataReturnsFalse. - Narrow FlushCsv() FileState mutex scope to cover only CSV writes; move persona fitter calls outside the lock to avoid unnecessary contention (NetPersonaFitter has its own internal mutex). Risks: Medium Priority: P1 Signed-off-by: Rajat <emailofrajatyadav@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Rajat <emailofrajatyadav@gmail.com> Co-authored-by: pstroffolino <Philip_Stroffolino@cable.comcast.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
VPAAMP-129 support to automatically generate json network persona files without need to run external tool
Reason for Change: support for generating JSON personas at runtime
Risks: Low
Priority: P1