MCPcopy
hub / github.com/NVIDIA/aistore / BenchmarkECEncode

Function BenchmarkECEncode

bench/integration/act_bench_test.go:57–94  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

55}
56
57func BenchmarkECEncode(b *testing.B) {
58 const (
59 bckSize = cos.GiB
60 )
61 var (
62 proxyURL = tutils.RandomProxyURL()
63 baseParams = tutils.BaseAPIParams(proxyURL)
64 )
65
66 for ecIdx, test := range ecTests {
67 for szIdx, size := range objSizes {
68 objCount := int(bckSize/size) + 1
69 bck := cmn.Bck{
70 Name: fmt.Sprintf("bench-ec-enc-%d", len(objSizes)*ecIdx+szIdx),
71 Provider: apc.ProviderAIS,
72 }
73 tutils.CreateBucketWithCleanup(b, proxyURL, bck, nil)
74 fillBucket(b, proxyURL, bck, uint64(size), objCount)
75
76 b.Run(test.name, func(b *testing.B) {
77 bckProps := &cmn.BucketPropsToUpdate{
78 EC: &cmn.ECConfToUpdate{
79 Enabled: api.Bool(true),
80 ObjSizeLimit: api.Int64(ecObjLimit),
81 DataSlices: api.Int(test.data),
82 ParitySlices: api.Int(test.parity),
83 },
84 }
85 _, err := api.SetBucketProps(baseParams, bck, bckProps)
86 tassert.CheckFatal(b, err)
87
88 reqArgs := api.XactReqArgs{Kind: apc.ActECEncode, Bck: bck, Timeout: ecTime}
89 _, err = api.WaitForXactionIC(baseParams, reqArgs)
90 tassert.CheckFatal(b, err)
91 })
92 }
93 }
94}
95
96func BenchmarkECRebalance(b *testing.B) {
97 const (

Callers

nothing calls this directly

Calls 11

RandomProxyURLFunction · 0.92
BaseAPIParamsFunction · 0.92
CreateBucketWithCleanupFunction · 0.92
BoolFunction · 0.92
Int64Function · 0.92
IntFunction · 0.92
SetBucketPropsFunction · 0.92
CheckFatalFunction · 0.92
WaitForXactionICFunction · 0.92
fillBucketFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected