Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use stdErr and red for errors #33

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ The generated trace logs can be summarized or compared using `vt benchstat`:

## Key Analysis Workflow

`vt key` analyzes a query log and outputs detailed information about table and column usage in queries. This data can be summarized using `vt benchstat`. Here's a typical workflow:
`vt keys` analyzes a query log and outputs detailed information about table and column usage in queries. This data can be summarized using `vt benchstat`. Here's a typical workflow:

1. **Run `vt key` to analyze the query log**:
1. **Run `vt keys` to analyze the query log**:

```bash
vt keys t/tpch.test > keys-log.json
Expand Down Expand Up @@ -122,4 +122,4 @@ Vitess Tester started as a fork from [pingcap/mysql-tester](https://github.com/p

---

This version includes an example workflow for `vt key` and clarifies the role of `vt benchstat`. Let me know if anything else needs adjustment.
This version includes an example workflow for `vt keys` and clarifies the role of `vt benchstat`. Let me know if anything else needs adjustment.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (

require (
github.com/alecthomas/chroma v0.10.0
github.com/fatih/color v1.17.0
github.com/jstemmer/go-junit-report/v2 v2.1.0
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.8.1
Expand Down Expand Up @@ -38,7 +39,6 @@ require (
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.7.1 // indirect
github.com/fatih/color v1.17.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.2 // indirect
Expand Down
6 changes: 3 additions & 3 deletions go/tester/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package tester

import (
"fmt"
"github.com/fatih/color"
"io"
"net/http"
"os"
Expand Down Expand Up @@ -129,7 +129,7 @@ func exitIf(err error, message string) {
if err == nil {
return
}
fmt.Println(message)
fmt.Println(err.Error())
c := color.New(color.FgRed)
_, _ = c.Fprintf(os.Stderr, "%s: %s\n", message, err.Error())
os.Exit(1)
}
Loading