Skip to content

Commit 341c7a3

Browse files
committed
Change benchmark code
1 parent 080a164 commit 341c7a3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

internal/api/lib_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,8 @@ func Benchmark100ConcurrentContractCalls(b *testing.B) {
835835
require.NoError(b, err)
836836
requireOkResponse(b, res, 0)
837837

838+
info = MockInfoBin(b, "fred")
839+
838840
const callCount = 100 // Calls per benchmark iteration
839841

840842
b.ResetTimer()
@@ -843,7 +845,7 @@ func Benchmark100ConcurrentContractCalls(b *testing.B) {
843845
errChan := make(chan error, callCount)
844846
resChan := make(chan []byte, callCount)
845847
wg.Add(callCount)
846-
info = MockInfoBin(b, "fred")
848+
847849
for i := 0; i < callCount; i++ {
848850
go func() {
849851
defer wg.Done()
@@ -1316,6 +1318,10 @@ func TestCustomReflectQuerier(t *testing.T) {
13161318
// https://github.com/CosmWasm/cosmwasm/blob/v0.11.0-alpha3/contracts/reflect/src/msg.rs#L18-L28
13171319
}
13181320

1321+
type CapitalizedResponse struct {
1322+
Text string `json:"text"`
1323+
}
1324+
13191325
cache, cleanup := withCache(t)
13201326
defer cleanup()
13211327
checksum := createReflectContract(t, cache)
@@ -1354,10 +1360,6 @@ func TestCustomReflectQuerier(t *testing.T) {
13541360
require.Equal(t, "SMALL FRYS :)", response.Text)
13551361
}
13561362

1357-
type CapitalizedResponse struct {
1358-
Text string `json:"text"`
1359-
}
1360-
13611363
// TestFloats is a port of the float_instrs_are_deterministic test in cosmwasm-vm
13621364
func TestFloats(t *testing.T) {
13631365
type Value struct {

0 commit comments

Comments
 (0)