Skip to content

Commit bc43a5e

Browse files
auto commit
1 parent b3fb2fc commit bc43a5e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

db-esdk-performance-testing/benchmarks/go/benchmark/testRunners.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,18 @@ func (b *DBESDKBenchmark) runMemoryTest(dataSize int) (*BenchmarkResult, error)
119119
var continuousSamples []MemorySample
120120
var samplingMutex sync.Mutex
121121

122+
// Get baseline
123+
metrics.Read(samples)
124+
beforeHeap := samples[0].Value.Uint64()
125+
beforeAllocs := samples[1].Value.Uint64()
126+
122127
go func() {
123128
sampledData := b.sampleMemoryContinuously(beforeHeap, beforeAllocs, stopSampling)
124129
samplingMutex.Lock()
125130
continuousSamples = sampledData
126131
samplingMutex.Unlock()
127132
}()
128133

129-
// Get baseline
130-
metrics.Read(samples)
131-
beforeHeap := samples[0].Value.Uint64()
132-
beforeAllocs := samples[1].Value.Uint64()
133-
134134
// Run operation
135135
operationStart := time.Now()
136136
_, _, err := b.runItemEncryptorCycle(data)

0 commit comments

Comments
 (0)