profiles/internal/rpc/stream/benchmark: Renames
Rename benchmarks to reflect:
- Security by default (so the insecure ones get called out)
- Remove TLS: Given @mattr-google's upcoming change to switch to NaclBox
as the default cipher used in VCs, using "TLS" in the name of the
benchmark didn't make much sense.
Change-Id: I3023773cfed33ab12ce50fc7906452781b8980d3
diff --git a/profiles/internal/rpc/stream/benchmark/dial_test.go b/profiles/internal/rpc/stream/benchmark/dial_test.go
index 0817440..789df5b 100644
--- a/profiles/internal/rpc/stream/benchmark/dial_test.go
+++ b/profiles/internal/rpc/stream/benchmark/dial_test.go
@@ -6,9 +6,9 @@
import "testing"
-func Benchmark_dial_VIF(b *testing.B) { benchmarkDialVIF(b, securityNone) }
-func Benchmark_dial_VIF_TLS(b *testing.B) { benchmarkDialVIF(b, securityTLS) }
+func Benchmark_dial_VIF_NoSecurity(b *testing.B) { benchmarkDialVIF(b, securityNone) }
+func Benchmark_dial_VIF(b *testing.B) { benchmarkDialVIF(b, securityDefault) }
-// Note: We don't benchmark Non-TLC VC Dial for now since it doesn't wait ack
+// Note: We don't benchmark SecurityNone VC Dial for now since it doesn't wait ack
// from the server after sending "OpenVC".
-func Benchmark_dial_VC_TLS(b *testing.B) { benchmarkDialVC(b, securityTLS) }
+func Benchmark_dial_VC(b *testing.B) { benchmarkDialVC(b, securityDefault) }
diff --git a/profiles/internal/rpc/stream/benchmark/dial_vc.go b/profiles/internal/rpc/stream/benchmark/dial_vc.go
index 4d9aeea..a355ade 100644
--- a/profiles/internal/rpc/stream/benchmark/dial_vc.go
+++ b/profiles/internal/rpc/stream/benchmark/dial_vc.go
@@ -28,7 +28,7 @@
principal security.Principal
blessings security.Blessings
)
- if mode == securityTLS {
+ if mode == securityDefault {
principal = testutil.NewPrincipal("test")
blessings = principal.BlessingStore().Default()
}
diff --git a/profiles/internal/rpc/stream/benchmark/dial_vif.go b/profiles/internal/rpc/stream/benchmark/dial_vif.go
index 138ff0d..c67e4a4 100644
--- a/profiles/internal/rpc/stream/benchmark/dial_vif.go
+++ b/profiles/internal/rpc/stream/benchmark/dial_vif.go
@@ -25,7 +25,7 @@
principal security.Principal
blessings security.Blessings
)
- if mode == securityTLS {
+ if mode == securityDefault {
principal = testutil.NewPrincipal("test")
blessings = principal.BlessingStore().Default()
}
diff --git a/profiles/internal/rpc/stream/benchmark/throughput_flow.go b/profiles/internal/rpc/stream/benchmark/throughput_flow.go
index 957fbf9..b1413a2 100644
--- a/profiles/internal/rpc/stream/benchmark/throughput_flow.go
+++ b/profiles/internal/rpc/stream/benchmark/throughput_flow.go
@@ -19,8 +19,8 @@
const (
// Shorthands
- securityNone = options.SecurityNone
- securityTLS = options.SecurityConfidential
+ securityNone = options.SecurityNone
+ securityDefault = options.SecurityConfidential
)
type listener struct {
@@ -38,7 +38,7 @@
principal security.Principal
blessings security.Blessings
)
- if mode == securityTLS {
+ if mode == securityDefault {
principal = testutil.NewPrincipal("test")
blessings = principal.BlessingStore().Default()
}
@@ -55,7 +55,7 @@
server := manager.InternalNew(naming.FixedRoutingID(0x55555555))
var principal security.Principal
- if mode == securityTLS {
+ if mode == securityDefault {
principal = testutil.NewPrincipal("test")
}
diff --git a/profiles/internal/rpc/stream/benchmark/throughput_test.go b/profiles/internal/rpc/stream/benchmark/throughput_test.go
index 1603ff1..39a0c46 100644
--- a/profiles/internal/rpc/stream/benchmark/throughput_test.go
+++ b/profiles/internal/rpc/stream/benchmark/throughput_test.go
@@ -31,25 +31,49 @@
func Benchmark_throughput_Pipe_4Conns(b *testing.B) { benchmarkPipe(b, 4) }
func Benchmark_throughput_Pipe_8Conns(b *testing.B) { benchmarkPipe(b, 8) }
-func Benchmark_throughput_Flow_1VIF_1VC_1Flow(b *testing.B) { benchmarkFlow(b, securityNone, 1, 1, 1) }
-func Benchmark_throughput_Flow_1VIF_1VC_2Flow(b *testing.B) { benchmarkFlow(b, securityNone, 1, 1, 2) }
-func Benchmark_throughput_Flow_1VIF_1VC_8Flow(b *testing.B) { benchmarkFlow(b, securityNone, 1, 1, 8) }
+func Benchmark_throughput_Flow_1VIF_1VC_1Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 1, 1, 1)
+}
+func Benchmark_throughput_Flow_1VIF_1VC_2Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 1, 1, 2)
+}
+func Benchmark_throughput_Flow_1VIF_1VC_8Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 1, 1, 8)
+}
-func Benchmark_throughput_Flow_1VIF_2VC_2Flow(b *testing.B) { benchmarkFlow(b, securityNone, 1, 2, 1) }
-func Benchmark_throughput_Flow_1VIF_2VC_8Flow(b *testing.B) { benchmarkFlow(b, securityNone, 1, 2, 4) }
+func Benchmark_throughput_Flow_1VIF_2VC_2Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 1, 2, 1)
+}
+func Benchmark_throughput_Flow_1VIF_2VC_8Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 1, 2, 4)
+}
-func Benchmark_throughput_Flow_2VIF_4VC_8Flow(b *testing.B) { benchmarkFlow(b, securityNone, 2, 2, 2) }
+func Benchmark_throughput_Flow_2VIF_4VC_8Flow_NoSecurity(b *testing.B) {
+ benchmarkFlow(b, securityNone, 2, 2, 2)
+}
func Benchmark_throughput_TLS_1Conn(b *testing.B) { benchmarkTLS(b, 1) }
func Benchmark_throughput_TLS_2Conns(b *testing.B) { benchmarkTLS(b, 2) }
func Benchmark_throughput_TLS_4Conns(b *testing.B) { benchmarkTLS(b, 4) }
func Benchmark_throughput_TLS_8Conns(b *testing.B) { benchmarkTLS(b, 8) }
-func Benchmark_throughput_Flow_1VIF_1VC_1FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 1, 1, 1) }
-func Benchmark_throughput_Flow_1VIF_1VC_2FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 1, 1, 2) }
-func Benchmark_throughput_Flow_1VIF_1VC_8FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 1, 1, 8) }
+func Benchmark_throughput_Flow_1VIF_1VC_1Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 1, 1, 1)
+}
+func Benchmark_throughput_Flow_1VIF_1VC_2Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 1, 1, 2)
+}
+func Benchmark_throughput_Flow_1VIF_1VC_8Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 1, 1, 8)
+}
-func Benchmark_throughput_Flow_1VIF_2VC_2FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 1, 2, 1) }
-func Benchmark_throughput_Flow_1VIF_2VC_8FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 1, 2, 4) }
+func Benchmark_throughput_Flow_1VIF_2VC_2Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 1, 2, 1)
+}
+func Benchmark_throughput_Flow_1VIF_2VC_8Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 1, 2, 4)
+}
-func Benchmark_throughput_Flow_2VIF_4VC_8FlowTLS(b *testing.B) { benchmarkFlow(b, securityTLS, 2, 2, 2) }
+func Benchmark_throughput_Flow_2VIF_4VC_8Flow(b *testing.B) {
+ benchmarkFlow(b, securityDefault, 2, 2, 2)
+}