Skip to content

Commit

Permalink
fix(compute/serve): update Viceroy guest profile flag (#1033)
Browse files Browse the repository at this point in the history
* Update after parameter change

* Add Viceroy version required for --profile-guest

Suggested by @Integralist.
  • Loading branch information
fgsch authored Oct 11, 2023
1 parent a88d865 commit 5d605bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/commands/compute/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewServeCommand(parent cmd.Registerer, g *global.Data, build *BuildCommand,
c.CmdClause.Flag("include-source", "Include source code in built package").Action(c.includeSrc.Set).BoolVar(&c.includeSrc.Value)
c.CmdClause.Flag("language", "Language type").Action(c.lang.Set).StringVar(&c.lang.Value)
c.CmdClause.Flag("package-name", "Package name").Action(c.packageName.Set).StringVar(&c.packageName.Value)
c.CmdClause.Flag("profile-guest", "Profile the Wasm guest under Viceroy. View profiles at https://profiler.firefox.com/.").BoolVar(&c.profileGuest)
c.CmdClause.Flag("profile-guest", "Profile the Wasm guest under Viceroy (requires Viceroy 0.9.1 or higher). View profiles at https://profiler.firefox.com/.").BoolVar(&c.profileGuest)
c.CmdClause.Flag("profile-guest-dir", "The directory where the per-request profiles are saved to. Defaults to guest-profiles.").Action(c.profileGuestDir.Set).StringVar(&c.profileGuestDir.Value)
c.CmdClause.Flag("skip-build", "Skip the build step").BoolVar(&c.skipBuild)
c.CmdClause.Flag("timeout", "Timeout, in seconds, for the build compilation step").Action(c.timeout.Set).IntVar(&c.timeout.Value)
Expand Down Expand Up @@ -577,7 +577,7 @@ func local(opts localOpts) error {
if opts.profileGuestDir.WasSet {
directory = opts.profileGuestDir.Value
}
args = append(args, "--profile-guest="+directory)
args = append(args, "--profile=guest,"+directory)
if opts.verbose {
text.Info(opts.out, "Saving per-request profiles to %s.", directory)
}
Expand Down

0 comments on commit 5d605bb

Please sign in to comment.