-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bench:message_passing): add missing neva.yml and fix working with…
… fs inside go bench func
- Loading branch information
Showing
6 changed files
with
40 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Remember - Go runs benchmark function twice: | ||
// first time for calibration, second time for actual benchmark. | ||
// This might affect working with relative paths! | ||
|
||
package test | ||
|
||
import ( | ||
"os" | ||
"os/exec" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func BenchmarkMessagePassing(b *testing.B) { | ||
// Store original working directory | ||
originalWd, err := os.Getwd() | ||
require.NoError(b, err) | ||
|
||
// Change to parent directory | ||
err = os.Chdir("..") | ||
require.NoError(b, err) | ||
|
||
// Ensure we return to original directory after benchmark | ||
defer func() { | ||
err := os.Chdir(originalWd) | ||
require.NoError(b, err) | ||
}() | ||
|
||
// Reset timer after setup | ||
b.ResetTimer() | ||
|
||
for i := 0; i < b.N; i++ { | ||
cmd := exec.Command("neva", "run", "message_passing") | ||
out, err := cmd.CombinedOutput() | ||
require.NoError(b, err, string(out)) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
neva: 0.30.2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.