Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Jan 15, 2024
1 parent 80c30af commit 8f7f877
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 69 deletions.
41 changes: 0 additions & 41 deletions go/tools/macrobench/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

"github.com/vitessio/arewefastyet/go/storage"

"github.com/dustin/go-humanize"
"github.com/vitessio/arewefastyet/go/exec/metrics"
"github.com/vitessio/arewefastyet/go/storage/mysql"
awftmath "github.com/vitessio/arewefastyet/go/tools/math"
Expand Down Expand Up @@ -231,46 +230,6 @@ func (mabd DetailsArray) ReduceSimpleMedian() (reduceMabd DetailsArray) {
return reduceMabd
}

func (mbr Result) TPSStr() string {
return humanize.FormatFloat("#,###.#", mbr.TPS)
}

func (mbr Result) LatencyStr() string {
return humanize.FormatFloat("#,###.#", mbr.Latency)
}

func (mbr Result) ErrorsStr() string {
return humanize.FormatFloat("#,###.#", mbr.Errors)
}

func (mbr Result) ReconnectsStr() string {
return humanize.FormatFloat("#,###.#", mbr.Reconnects)
}

func (mbr Result) TimeStr() string {
return humanize.Comma(int64(mbr.Time))
}

func (mbr Result) ThreadsStr() string {
return humanize.FormatFloat("#,###.#", mbr.Threads)
}

func (qps QPS) TotalStr() string {
return humanize.FormatFloat("#,###.#", qps.Total)
}

func (qps QPS) ReadsStr() string {
return humanize.FormatFloat("#,###.#", qps.Reads)
}

func (qps QPS) WritesStr() string {
return humanize.FormatFloat("#,###.#", qps.Writes)
}

func (qps QPS) OtherStr() string {
return humanize.FormatFloat("#,###.#", qps.Other)
}

func GetDetailsFromAllTypes(sha string, planner PlannerVersion, dbclient storage.SQLClient, types []string) (map[string]Details, error) {
details, err := GetDetailsArraysFromAllTypes(sha, planner, dbclient, types)
if err != nil {
Expand Down
28 changes: 0 additions & 28 deletions go/tools/macrobench/results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,34 +118,6 @@ func BenchmarkReduceSimpleMedian(b *testing.B) {
}
}

func TestHumanReadableStrings(t *testing.T) {
c := qt.New(t)
r := Result{
QPS: QPS{
Total: 72029.0,
Reads: 45018.1,
Writes: 18007.2,
Other: 9003.6,
},
TPS: 4501.8,
Latency: 189848.3,
Errors: 8999.6,
Reconnects: 7984.3,
Time: 11064,
Threads: 1107794.12,
}
c.Assert(r.QPS.TotalStr(), qt.Equals, "72,029.0")
c.Assert(r.QPS.ReadsStr(), qt.Equals, "45,018.1")
c.Assert(r.QPS.WritesStr(), qt.Equals, "18,007.2")
c.Assert(r.QPS.OtherStr(), qt.Equals, "9,003.6")
c.Assert(r.TPSStr(), qt.Equals, "4,501.8")
c.Assert(r.LatencyStr(), qt.Equals, "189,848.3")
c.Assert(r.ErrorsStr(), qt.Equals, "8,999.6")
c.Assert(r.ReconnectsStr(), qt.Equals, "7,984.3")
c.Assert(r.TimeStr(), qt.Equals, "11,064")
c.Assert(r.ThreadsStr(), qt.Equals, "1,107,794.1")
}

func TestCompareDetailsArrays(t *testing.T) {
type args struct {
references DetailsArray
Expand Down

0 comments on commit 8f7f877

Please sign in to comment.