Skip to content

Commit a5da6d2

Browse files
committed
Changes:
- Rename boom to pla and make progressbar say plaa! - Don't preallocate all requests - WaitGroup should count and wait for the number of workers to be done - Add support for stopping pla and make it print report
1 parent 758f414 commit a5da6d2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

boomer/boomer.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"sync"
2828
"time"
2929

30-
"github.com/rakyll/pb"
30+
"github.com/sschepens/pb"
3131
)
3232

3333
type result struct {
@@ -78,6 +78,7 @@ type Boomer struct {
7878

7979
bar *pb.ProgressBar
8080
results chan *result
81+
stop chan bool
8182
}
8283

8384
func (b *Boomer) startProgress() {
@@ -86,6 +87,11 @@ func (b *Boomer) startProgress() {
8687
}
8788
b.bar = pb.New(b.N)
8889
b.bar.Format("Bom !")
90+
b.bar.BarStart = "Pl"
91+
b.bar.BarEnd = "!"
92+
b.bar.Empty = " "
93+
b.bar.Current = "a"
94+
b.bar.CurrentN = "a"
8995
b.bar.Start()
9096
}
9197

boom.go renamed to pla.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"runtime"
2525
"strings"
2626

27-
"github.com/rakyll/boom/boomer"
27+
"github.com/sschepens/pla/boomer"
2828
)
2929

3030
const (
@@ -55,7 +55,7 @@ var (
5555
proxyAddr = flag.String("x", "", "")
5656
)
5757

58-
var usage = `Usage: boom [options...] <url>
58+
var usage = `Usage: pla [options...] <url>
5959
6060
Options:
6161
-n Number of requests to run.
File renamed without changes.

0 commit comments

Comments
 (0)