Skip to content

Commit

Permalink
fix(benchops): support 32-bit compilation (#3373)
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl authored Dec 20, 2024
1 parent e57815a commit 7f09c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnovm/pkg/benchops/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type exporter struct {
// byte 2: StoreCode
// byte 3-6: Duration
// byte 7-10: Size
func (e *exporter) export(code Code, elapsedTime time.Duration, size int) {
func (e *exporter) export(code Code, elapsedTime time.Duration, size int64) {
// the MaxUint32 is 4294967295. It represents 4.29 seconds in duration or 4G bytes.
// It panics not only for overflow protection, but also for abnormal measurements.
if elapsedTime > math.MaxUint32 {
Expand Down Expand Up @@ -74,7 +74,7 @@ func FinishStore() {
fileWriter.export(
code,
measure.storeAccumDur[i]/time.Duration(count),
int(measure.storeAccumSize[i]/count),
measure.storeAccumSize[i]/count,
)
}
}
Expand Down

0 comments on commit 7f09c6f

Please sign in to comment.