Skip to content

VPAAMP-129 Support for collecting network profiling and exporting sta…#1328

Merged
pstroffolino merged 6 commits into
dev_sprint_25_2from
feature/VPAAMP-129
Apr 23, 2026
Merged

VPAAMP-129 Support for collecting network profiling and exporting sta…#1328
pstroffolino merged 6 commits into
dev_sprint_25_2from
feature/VPAAMP-129

Conversation

@rajat698
Copy link
Copy Markdown
Contributor

@rajat698 rajat698 commented Apr 20, 2026

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

…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>
@rajat698 rajat698 requested a review from a team as a code owner April 20, 2026 17:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_fitter static 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 link net_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.

Comment thread simnet/CMakeLists.txt Outdated
Comment thread simnet/net_persona_fitter.h Outdated
Comment thread net_trace.h Outdated
Comment thread simnet/net_persona_fitter.cpp Outdated
pstroffolino and others added 2 commits April 23, 2026 12:29
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).
@pstroffolino pstroffolino merged commit 83e9102 into dev_sprint_25_2 Apr 23, 2026
6 of 7 checks passed
@pstroffolino pstroffolino deleted the feature/VPAAMP-129 branch April 24, 2026 23:33
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants