Skip to content

Commit

Permalink
[Downstream] VPP Main heap stats
Browse files Browse the repository at this point in the history
This commit includes series of upstream patches squashed:
- https://gerrit.fd.io/r/c/vpp/+/31678
- https://gerrit.fd.io/r/c/vpp/+/31636
- https://gerrit.fd.io/r/c/vpp/+/31636

Also, in respect to new statistics layout, basic counter verification
test has been changed.

This commit also excludes vpp-patches/.. files to be processed
during checkstyle analysis.
  • Loading branch information
Sergey Matov authored and sergeymatov committed Jul 1, 2021
1 parent 2d5b979 commit 278ac5a
Show file tree
Hide file tree
Showing 3 changed files with 2,488 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hack/checkstyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ done
if [ "${FULL}" == "1" ]; then
FILELIST=$(git ls-tree -r HEAD --name-only)
else
FILELIST=$((git diff HEAD~1.. --name-only; git ls-files -m ) | sort -u)
FILELIST=$((git diff HEAD~1.. --name-only; git ls-files -m ) | sort -u | egrep -v vpp-patches)
fi
# Check to make sure we have indent. Exit if we don't with an error message, but
Expand Down
12 changes: 6 additions & 6 deletions upf/test/test_upf.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,13 @@ def send_from_sgi_to_ue(self, payload=None, l4proto=UDP, ue_port=12345,

def verify_upg_counters(self, expected_assoc=0, expected_sessions=0,
expected_flows=0):
flow_counter = self.statistics.dump(self.statistics.ls('/upf/total_flows'))
session_counter = self.statistics.dump(self.statistics.ls('/upf/total_sessions'))
association_counter = self.statistics.dump(self.statistics.ls('/upf/total_assoc'))
flow_counter = self.statistics['/upf/total_flows']
session_counter = self.statistics['/upf/total_sessions']
association_counter = self.statistics['/upf/total_assoc']
# Counter dir is implemented as a per-cpu vector of vectors
self.assertEqual(flow_counter['/upf/total_flows'][0][0], expected_flows)
self.assertEqual(session_counter['/upf/total_sessions'][0][0], expected_sessions)
self.assertEqual(association_counter['/upf/total_assoc'][0][0], expected_assoc)
self.assertEqual(flow_counter[0][0], expected_flows)
self.assertEqual(session_counter[0][0], expected_sessions)
self.assertEqual(association_counter[0][0], expected_assoc)

class TestTDFBase(PFCPHelper):
"""Base TDF Test"""
Expand Down
Loading

0 comments on commit 278ac5a

Please sign in to comment.