| "v.io/core/veyron/lib/testutil" |
| "v.io/core/veyron/runtimes/google/ipc/stream/vif" |
| "v.io/core/veyron2/naming" |
| "v.io/core/veyron2/options" |
| // benchmarkVIFDial measures VIF creation time over the underlying net connection. |
| func benchmarkVIFDial(b *testing.B, mode options.VCSecurityLevel) { |
| stats := testutil.NewBenchStats(16) |
| // Reset the timer to exclude any underlying setup time from measurement. |
| for i := 0; i < b.N; i++ { |
| server, err := vif.InternalNewAcceptedVIF(ns, naming.FixedRoutingID(0x5), nil, mode) |
| client, err := vif.InternalNewDialedVIF(nc, naming.FixedRoutingID(0xc), nil, mode) |
| duration := time.Since(start) |