Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Thinkit] Add sFlow gNMI config in sFlow test. Increase sFlow tolerance rate. Add a test to verify sampling size works. Fix sample size issue. Adds sFlow gNMI config constants. #845

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
37 changes: 37 additions & 0 deletions tests/lib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,40 @@ cc_library(
"@com_google_absl//absl/synchronization",
],
)

cc_library(
name = "packet_generator",
testonly = True,
srcs = ["packet_generator.cc"],
hdrs = ["packet_generator.h"],
deps = [
"//gutil:proto",
"//gutil:status",
"//p4_pdpi/netaddr:ipv4_address",
"//p4_pdpi/netaddr:mac_address",
"//p4_pdpi/packetlib",
"//p4_pdpi/packetlib:bit_widths",
"//p4_pdpi/packetlib:packetlib_cc_proto",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/numeric:int128",
"@com_google_absl//absl/random:distributions",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
)

cc_test(
name = "packet_generator_test",
srcs = ["packet_generator_test.cc"],
deps = [
":packet_generator",
"//gutil:proto_matchers",
"//gutil:status_matchers",
"//p4_pdpi/packetlib",
"//p4_pdpi/packetlib:packetlib_cc_proto",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
Loading
Loading