summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/tcp/BUILD
blob: 6dde7d9e618666dfcf5450bfa1376fd23fd3a932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
load("//tools:defs.bzl", "cc_binary", "go_binary")

package(licenses = ["notice"])

go_binary(
    name = "tcp_proxy",
    srcs = ["tcp_proxy.go"],
    visibility = ["//:sandbox"],
    deps = [
        "//pkg/tcpip",
        "//pkg/tcpip/adapters/gonet",
        "//pkg/tcpip/link/fdbased",
        "//pkg/tcpip/link/qdisc/fifo",
        "//pkg/tcpip/network/arp",
        "//pkg/tcpip/network/ipv4",
        "//pkg/tcpip/stack",
        "//pkg/tcpip/transport/tcp",
        "//pkg/tcpip/transport/udp",
        "@org_golang_x_sys//unix:go_default_library",
    ],
)

# nsjoin is a trivial replacement for nsenter. This is used because nsenter is
# not available on all systems where this benchmark is run (and we aim to
# minimize external dependencies.)

cc_binary(
    name = "nsjoin",
    srcs = ["nsjoin.c"],
    visibility = ["//:sandbox"],
)

sh_binary(
    name = "tcp_benchmark",
    srcs = ["tcp_benchmark.sh"],
    data = [
        ":nsjoin",
        ":tcp_proxy",
    ],
    visibility = ["//:sandbox"],
)