Skip to content

Commit

Permalink
Merge pull request #21 from lightpanda-io/move-jsruntime-bench
Browse files Browse the repository at this point in the history
Move jsruntime bench
  • Loading branch information
krichprollsch authored Apr 10, 2024
2 parents 36c341a + 022c338 commit a91f0b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions cmd/history/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func main() {
}

const (
SourceBench = "bench"
SourceWPT = "wpt"

AWSRegion = "eu-west-3"
AWSBucket = "lpd-perf"
)
Expand Down Expand Up @@ -99,7 +96,7 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) error {
}

// pull history.json file
fio, err := s3.NewS3IO(env("AWS_BUCKET", AWSBucket), "bench/history.json")
fio, err := s3.NewS3IO(env("AWS_BUCKET", AWSBucket), "bench/jsruntime/history.json")
if err != nil {
return fmt.Errorf("news3io single result: %w", err)
}
Expand Down Expand Up @@ -162,7 +159,7 @@ APPEND:

// upload all individual file to s3
filename := fmt.Sprintf("%s_%v.json", v.Time.Format("2006-01-02_15-04"), v.Hash)
fio, err := s3.NewS3IO(env("AWS_BUCKET", AWSBucket), "bench/"+filename)
fio, err := s3.NewS3IO(env("AWS_BUCKET", AWSBucket), "bench/jsruntime/"+filename)
if err != nil {
return fmt.Errorf("news3io single result: %w", err)
}
Expand Down
7 changes: 2 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ const (
SourceBenchBrowser = "bench-browser"
SourceWPT = "wpt"

// deprecated source, alias to bench-jsruntime.
SourceBench = "bench"

AWSRegion = "eu-west-3"
AWSBucket = "lpd-perf"

PathBenchJSRuntime = "bench"
PathBenchJSRuntime = "bench/jsruntime"
PathBenchBrowser = "bench/browser"
PathWPT = "wpt"
)
Expand Down Expand Up @@ -94,7 +91,7 @@ func run(ctx context.Context, args []string, stdout, stderr io.Writer) error {
)

switch args[0] {
case SourceBench, SourceBenchJSRuntime:
case SourceBenchJSRuntime:
append = &jsrbench.Append{}
path = PathBenchJSRuntime
case SourceBenchBrowser:
Expand Down

0 comments on commit a91f0b4

Please sign in to comment.