github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/test/benchmarks/tcp/BUILD (about)

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