gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/test/benchmarks/tcp/BUILD (about)

     1  load("//tools:defs.bzl", "cc_binary", "go_binary")
     2  
     3  package(
     4      default_applicable_licenses = ["//:license"],
     5      licenses = ["notice"],
     6  )
     7  
     8  go_binary(
     9      name = "tcp_proxy",
    10      srcs = [
    11          "tcp_proxy.go",
    12          "xdp.go",
    13      ],
    14      visibility = ["//:sandbox"],
    15      deps = [
    16          "//pkg/tcpip",
    17          "//pkg/tcpip/adapters/gonet",
    18          "//pkg/tcpip/link/fdbased",
    19          "//pkg/tcpip/link/qdisc/fifo",
    20          "//pkg/tcpip/link/sniffer",
    21          "//pkg/tcpip/link/xdp",
    22          "//pkg/tcpip/network/arp",
    23          "//pkg/tcpip/network/ipv4",
    24          "//pkg/tcpip/network/ipv6",
    25          "//pkg/tcpip/stack",
    26          "//pkg/tcpip/transport/icmp",
    27          "//pkg/tcpip/transport/tcp",
    28          "//pkg/tcpip/transport/udp",
    29          "//runsc/sandbox/bpf",
    30          "@com_github_cilium_ebpf//:go_default_library",
    31          "@com_github_cilium_ebpf//link:go_default_library",
    32          "@org_golang_x_sys//unix:go_default_library",
    33      ],
    34  )
    35  
    36  # nsjoin is a trivial replacement for nsenter. This is used because nsenter is
    37  # not available on all systems where this benchmark is run (and we aim to
    38  # minimize external dependencies.)
    39  
    40  cc_binary(
    41      name = "nsjoin",
    42      srcs = ["nsjoin.c"],
    43      visibility = ["//:sandbox"],
    44  )
    45  
    46  sh_binary(
    47      name = "tcp_benchmark",
    48      srcs = ["tcp_benchmark.sh"],
    49      data = [
    50          ":nsjoin",
    51          ":tcp_proxy",
    52      ],
    53      visibility = ["//:sandbox"],
    54  )