Skip to content

Commit

Permalink
CLI: 'show performance'
Browse files Browse the repository at this point in the history
* remove redundant alias

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Jul 19, 2024
1 parent eb9aa1d commit 0609b04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/cli/cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func (a *acli) setupCommands(emptyCmdline bool) {
storageCmd,
archCmd,
logCmd,
perfCmd,
showCmdPeformance,
remClusterCmd,
a.getAliasCmd(),
}
Expand Down
8 changes: 0 additions & 8 deletions cmd/cli/cli/performance.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ var (
nonverboseFlag,
)

// alias
perfCmd = cli.Command{
Name: commandPerf,
Usage: showPerfArgument,
Subcommands: []cli.Command{
makeAlias(showCmdPeformance, "", true, commandShow),
},
}
// `show performance` command
showCmdPeformance = cli.Command{
Name: commandPerf,
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ is equivalent to:
$ ais <command> show
```

> For instance, `ais performance show` is an alias for `ais show performance` - both can be used interchangeably.
> For instance, `ais show performance` is an alias for `ais performance` - both can be used interchangeably.
> As a general rule, instead of remembering any of the above (as well as any of the below), type (e.g.) `ais perf<TAB-TAB>` and press `Enter`.
Expand Down
8 changes: 4 additions & 4 deletions stats/target_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ func (r *Trunner) _softErrs(config *cmn.Config) {
}
debug.Assert(c.SoftErrs > 0 && c.SoftErrTime > 0)

n := r.numSoftErrs() - ratomic.LoadInt64(&r.nonIOErr) // correction
d := n - r.softErrs
n := r.numSoftErrs() - ratomic.LoadInt64(&r.nonIOErr) // num soft excluding non-IO
d := n - r.softErrs // the delta
r.softErrs = n // until next periodic call
debug.Assert(d >= 0 && n >= 0)
r.softErrs = n

j := d * int64(c.SoftErrTime) / int64(r.core.statsTime)
j := d * int64(c.SoftErrTime) / int64(r.core.statsTime) // recompute
if j < int64(c.SoftErrs) {
return
}
Expand Down

0 comments on commit 0609b04

Please sign in to comment.