Giter VIP home page Giter VIP logo

ali's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ali's Issues

Disregard for outliers

Even one outlier makes it difficult to analyze the other parts. It would be nice to be able to ignore outliers by specifying a percentile.

Screenshot

Histogram bar chart

Give buckets as:

ali --buckets "1ms, 10ms, 100ms, 500ms" http://host.xz

Then drawn as a bar chart:

image

https://github.com/mum4k/termdash/blob/master/doc/images/barchartdemo.gif

More... (TBD)

it may be helpful to appear on the others widget:

0~1ms: 1 25%
1ms~10ms: 1 25%
10ms~100ms: 1 25%
100ms~500ms: 1 25%

Suppose there's an SLA that says 95% of requests must be returned within 500ms. It would be helpful.

TODO:

  • Make it capable of giving histogram buckets from comma-separated args. (#68)
  • Add bar chart which draw histogram buckets

Header values containing comma won't work

First of all: Thanks heaps for this wonderful tool. I am absolutely loving it. Great work, thanks!

I just noticed headers are declared as StringSliceVarP:

flagSet.StringSliceVarP(&c.headers, "header", "H", []string{}, "A request header to be sent. Can be used multiple times to send multiple headers.")

Why allow comma separated values within the --header flag? I think for header values it's a common use case to have them contain a comma separated list of values (i.e. user groups).

Solution: Switch to StringArrayVarP and force users to supply multiple --header flags to define all header fields.

So instead of:

ali --header "key1:value1,key2:value2"

Use this:

ali --header "groups:group1,group2,group3" --header "user:username"

What do you think?

Unable to install with "brew install nakabonne/ali/ali"

I noticed this when installing:

$ brew install nakabonne/ali/ali
==> Tapping nakabonne/ali
Cloning into '/usr/local/Homebrew/Library/Taps/nakabonne/homebrew-ali'...
remote: Enumerating objects: 39, done.
remote: Counting objects: 100% (39/39), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 39 (delta 13), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (39/39), 6.26 KiB | 6.26 MiB/s, done.
Resolving deltas: 100% (13/13), done.
Tapped 1 formula (26 files, 33.6KB).
Error: No available formula or cask with the name "nakabonne/ali/ali".
==> Searching for similarly named formulae...
This similarly named formula was found:
ali
To install it, run:
  brew install ali
~ ⌚ 9:02:48
$ brew install ali              
==> Installing ali from nakabonne/ali
==> Downloading https://github.com/nakabonne/ali/releases/download/v0.3.3/ali_0.3.3_darwin_amd64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/294836885/d0365a80-0
######################################################################## 100.0%
🍺  /usr/local/Cellar/ali/0.3.3: 5 files, 6.2MB, built in 2 seconds
```
`

panic: runtime error: slice bounds out of range [6:1]

This bug occurs some times more or less randomly producing the following message:

panic: runtime error: slice bounds out of range [6:1]

goroutine 53 [running]:in:

github.com/nakabonne/tstorage.(*memoryMetric).selectPoints(0xc0001ba7e0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x0, 0x0, 0x0)
        /root/go/pkg/mod/github.com/nakabonne/[email protected]/memory_partition.go:232 +0x27b
github.com/nakabonne/tstorage.(*memoryPartition).selectDataPoints(0xc000132200, 0x82dbf7, 0x7, 0x0, 0x0, 0x0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x449a4c, 0xc000092238, ...)
        /root/go/pkg/mod/github.com/nakabonne/[email protected]/memory_partition.go:124 +0x9e
github.com/nakabonne/tstorage.(*storage).Select(0xc000132180, 0x82dbf7, 0x7, 0x0, 0x0, 0x0, 0x16a06b537e57044c, 0x16a06b5a7a7ab04c, 0x46a77b, 0x77b3455e6fa8, ...)
        /root/go/pkg/mod/github.com/nakabonne/[email protected]/storage.go:324 +0x262
github.com/nakabonne/ali/storage.(*storage).Select(0xc00012e260, 0x82dbf7, 0x7, 0xc043adf3db12ae4c, 0x323d8539, 0xb456e0, 0xc043adfb5b12ae4c, 0x72e613139, 0xb456e0, 0x0, ...)
        /opt/ali/storage/storage.go:116 +0x105
github.com/nakabonne/ali/gui.(*drawer).redrawCharts(0xc0001c6480, 0x8a5ab8, 0xc00007e000)
        /opt/ali/gui/drawer.go:53 +0x262
created by github.com/nakabonne/ali/gui.attack
        /opt/ali/gui/keybinds.go:55 +0x9d

I have opened a PR in the underlying library to fix it - see nakabonne/tstorage#30

Error when duration is set to 0s

If I run

➜  ~ ali --duration=0s https://google.com
duration must be greater than 0

I get that duration must be greater than 0. But in the help text it says:

  -d, --duration duration   The amount of time to issue requests to the targets. Give 0s for an infinite attack. (default 10s)

Is infinite attack supported or not?

zoom: undo with right click?

Took me sometime to notice we can undo a Zoom with the mouse scroll (why? Not sure. Perhaps documentation in the README will do), but I thought that we can simulate zoom-outs with a mouse right click.

Does it make sense to you? (Zoom in with selection; zoom out with right click)

Support more options for HTTP requests

  • int workers
  • int maxWorkers
  • int connections
  • int maxConnections
  • int maxBody
  • string localAddr
  • string unixSocket
  • string proxyHeader
  • bool chunkedBody
  • bool keepAlive
  • bool HTTP2
  • bool H2C

PPA for Ubuntu-based systems

ali is published as a .deb package, but for long-term use, where one would like to get updates as part of system maintenance so that we easily have an up-to-date version.

We need to look into how to do automatic updates during general usage, e.g. in CI.

Support local address option

  • Make it possible to specify the local address used with the requests by passing --local-addr

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

featreq: support for multiple URLs

It would be nice to be able to specify a list of URLs to send traffic to.

Not sure how best to handle the division of URLs vs traffic, but for my personal needs a simple round-robin across the URLs would work. I.e. with 2 URLs: request1 -> url1, request2 -> url2, request3 -> url1, request4 -> url2, etc.

How does DNS resoluton work?

I’d like to map a few domains/hosts to certain IP address, e.g. to load test a new server. I tried the following things:

  • docker run --rm -it --add-host example.com:10.0.0.1 nakabonne/ali ali example.com
  • docker run --rm -it -v $(pwd)/hosts:/etc/hosts nakabonne/ali ali example.com with a custom hosts file mapped into the container
  • docker run --rm -it --network=host nakabonne/ali ali example.com with a modified hosts file on the docker host

but none of the above worked for me. Instead, ali would always hit the original server.

Support resolvers option

It would be nice to have the option which specifies the list of custom DNS resolver addresses (comma-separated list). Maybe It works only on non Windows systems.

Example:

ali --resolvers="1.2.3.4,192.168.11.1:53" http:host.xz

We can borrow around here.

Status codes are out of order

What's happened
When more than one status code (and errors) is reported, the order is not constant and could be replaced at irregular intervals.
order

Cause
Since the map is iterated to build a string.

ali/gui/drawer.go

Lines 217 to 230 in 1329145

// TODO: Guaranteed to be in order.
codesText := ""
for code, n := range m.StatusCodes {
codesText += fmt.Sprintf(`%q: %d
`, code, n)
}
d.widgets.statusCodesText.Write(codesText, text.WriteReplace())
errorsText := ""
for _, e := range m.Errors {
errorsText += fmt.Sprintf(`- %s
`, e)
}
d.widgets.errorsText.Write(errorsText, text.WriteReplace())

Concurrent requests

Excuse me?

How does this tool test 500 concurrent requests for URLs? You need to look at those parameters

Plot more metrics in real-time

It would be nice if it's able to press Ctrl-i to switch between charts.

  • Plot 50th, 90th, 95th, and 99th percentiles #66
  • Bytes In and Bytes Out
  • Status Codes
  • Histogram #63
  • Workers running in concurrent

modify others text for better reading

This is actually a question.

Perhaps Earliest/Latest/End shouldn't use String() for a time.Time. It gets noisy when you have a timezone (because of Monotonic):
image

Perhaps we can use time.RFC3339Nano?

image

Or some middleground, without the T:
image

Or without millis/nanos:
image

Or without millis/nanos and aligned:
image

Or with millis/nanos, aligned, without monotonic:
image

And (I know I'm talking mostly about date but...) with everything aligned:
image

How to post diffrent data?

ali -H "Accept: application/json" -H "Content-type: application/json" \ -m "POST" \ -b '{"name":"xxx"}'

now i want to send some diffrent data peer request, What shall I do?

Support max body option

  • Enable to set maximum number of bytes to capture from response bodies, by giving -B or --max-body.

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

Export Functionality

Would love some export functionality of all the data that is collected.

Simplest export would be a "CSV" file where each line is latency & start time of each request in order they were made.

Eventually we could expand this to include other things about the request like the response size, start timestamps, number of request there were in parallel when you started it etc.

I don't want to export processed data. Since they're fairly basic calculations I don't think that weight should fall on this tool; as it is not its main focus.

Support workers options

  • Enable to specify the initial number of workers by giving -wor --workers
  • Enable to specify the maximum number of workers by giving -Wor --max-workers

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

Vegeta causes panic at high rates

Run the following:

ali -r 1000 http://host.xz

Then panic occurred.
The noteworthy stack traces are:

  • tsenart/vegeta/v12/lib/attack.go:340
  • tsenart/vegeta/v12/lib/attack.go:312

image

Support connections options

  • Enable to specify maximum open idle connections per target host by giving -cor --connections

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

Requestparameter as cli options

Hey,

please add the feature to add cli options for the http(s) requests like
ali --targeturl=http://www.foo.bar --duration=10 --timeout=30
an so on.
Thank you.

support multiple headers

Love this project. I'm already starting to work on multiple headers and I'll open a PR soon if you have no problem with this functionality.

go test fails

$ go test
# github.com/nakabonne/ali
./main.go:32:3: Fprintln arg list ends with redundant newline
FAIL    github.com/nakabonne/ali [build failed]

Panic when running at high rate

What's happened

ali -r 0 -d 2s http://host.xz

Then:
image

Possible Causes

It's probably due to the time it takes to draw to all the charts. Maybe we should each spawn goroutine.

ali/gui/drawer.go

Lines 66 to 84 in 2711e42

valuesP50 = appendValue(valuesP50, res.P50)
d.widgets.percentilesChart.Series("p50", valuesP50,
linechart.SeriesCellOpts(d.widgets.p50Legend.cellOpts...),
)
valuesP90 = appendValue(valuesP90, res.P90)
d.widgets.percentilesChart.Series("p90", valuesP90,
linechart.SeriesCellOpts(d.widgets.p90Legend.cellOpts...),
)
valuesP95 = appendValue(valuesP95, res.P95)
d.widgets.percentilesChart.Series("p95", valuesP95,
linechart.SeriesCellOpts(d.widgets.p95Legend.cellOpts...),
)
valuesP99 = appendValue(valuesP99, res.P99)
d.widgets.percentilesChart.Series("p99", valuesP99,
linechart.SeriesCellOpts(d.widgets.p99Legend.cellOpts...),
)

Support HTTP2 option

  • Make it possible to switch to send HTTP/2 requests when supported by the server

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

Natively support specifying HTTP proxies

I've had very mixed results for some reason specifying the environment variable HTTP_PROXY to Ali.
Not sure if this is related, but it would be nice to natively support supplying a proxy via an argument.

e.g. curl uses -x.

Better input fields

To support more options, need to be expandable.

  • Make a modal or something else
    • Using another container makes it complicated
  • Make it possible to move fields with the Tab key.

Panic when reading StatusCodes map while infinite attack

While the likelihood of occurrence has decreased by merging #77, panic still occurs.

Give as:

ali -d 30s -r 0 http://host.xz

Then:

goroutine 37 [running]:                                                    β”‚β”‚                                                                          β”‚β”‚                                                                          β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚                                                                            β”‚
runtime.throw(0x1410c0a, 0x26)                                             β”‚β”‚                                                                          β”‚β”‚                                                                          β”‚β”ŒErrors─────────────────────────────────────────────────────────────────────┐│                                                                            β”‚
β”‚       /opt/hostedtoolcache/go/1.15.3/x64/src/runtime/panic.go:1116 +0x72 fp=0xc015c03b40 sp=0xc015c03b10 pc=0x1034b32                                β”‚β”‚                                                                          β”‚β”‚- Get "http://34.84.111.163:9898": dial tcp 0.0.0.0:0->34.84.111.163:9898: β”‚β”‚                                                                            β”‚
runtime.mapiternext(0xc015c03d40)                                          β”‚β”‚                                                                          β”‚β”‚                                                                          β”‚β”‚socket: too many open files                                                β”‚β”‚                                                                            β”‚
β”‚       /opt/hostedtoolcache/go/1.15.3/x64/src/runtime/map.go:853 +0x554 fp=0xc015c03bc0 sp=0xc015c03b40 pc=0x1010814                                  β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
github.com/nakabonne/ali/gui.(*drawer).redrawMetrics(0xc0000b80d0, 0x1476c20, 0xc00009e080)                                                            β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
β”‚       /home/runner/work/ali/ali/gui/drawer.go:218 +0x193 fp=0xc015c03fc8 sp=0xc015c03bc0 pc=0x1347373                                                β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
runtime.goexit()                                                           β”‚β”‚                                                                          β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
β”‚       /opt/hostedtoolcache/go/1.15.3/x64/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc015c03fd0 sp=0xc015c03fc8 pc=0x1068fe1                              β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
created by github.com/nakabonne/ali/gui.run                                β”‚β”‚                                                                          β”‚β”‚                                                                          β”‚β”‚                                                                           β”‚β”‚                                                                            β”‚
β”‚       /home/runner/work/ali/ali/gui/gui.go:78 +0x63c

For some reason, there is panic here:

for code, n := range m.StatusCodes {

fix issue with percentiles chart navigation

OK, so this one is actually weird.

From the point of view of code, the current implementation is correct.

From the point of view of usability, though, it's incorrect.

As the first chart in ali is latencyChart, pressing L the first time does not change to the next chart, which is percentiles.
This problem does not happen with backwards button (H), and is easily fixed with changing start position to 0 (which is a fact).

I'm finishing a PR that will fix this problem.

Data race in termdash

What's happened

Whenever we do:

  • running with -race option
  • Attack with Enter
  • Quit with Ctrl-C

A data race has been detected as shown below:

go run -race main.go http://host.xz

==================
WARNING: DATA RACE
Write at 0x00c00013c5b0 by main goroutine:
  internal/poll.(*FD).destroy()
      /usr/local/Cellar/go/1.15.1/libexec/src/internal/poll/fd_unix.go:78 +0xc4
  internal/poll.(*FD).decref()
      /usr/local/Cellar/go/1.15.1/libexec/src/internal/poll/fd_mutex.go:213 +0x53
  internal/poll.(*FD).Close()
      /usr/local/Cellar/go/1.15.1/libexec/src/internal/poll/fd_unix.go:99 +0x79
  os.(*file).close()
      /usr/local/Cellar/go/1.15.1/libexec/src/os/file_unix.go:235 +0x76
  os.(*File).Close()
      /usr/local/Cellar/go/1.15.1/libexec/src/os/file_posix.go:25 +0x567
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:142 +0x525
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x00c00013c5b0 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018accf0 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:146 +0x597
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x0000018accf0 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018acce8 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:147 +0x5b2
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x0000018acce8 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x000001879530 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:149 +0x5e8
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x000001879530 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018207b8 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:153 +0x65d
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous write at 0x0000018207b8 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018207c0 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:154 +0x678
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous write at 0x0000018207c0 by goroutine 18:
  [failed to restore the stack]

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018207a0 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:155 +0x693
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x0000018207a0 by goroutine 18:
  github.com/nsf/termbox-go.Flush()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:208 +0x773
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Flush()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:113 +0x2f
  github.com/mum4k/termdash.(*termdash).redraw()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:278 +0x1bd
  github.com/mum4k/termdash.(*termdash).evRedraw()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:294 +0xa6
  github.com/mum4k/termdash.(*termdash).subscribers.func3()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:230 +0x44
  github.com/mum4k/termdash/private/event.(*subscriber).callback()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:95 +0x5a
  github.com/mum4k/termdash/private/event.(*subscriber).run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:110 +0xd2

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
==================
WARNING: DATA RACE
Write at 0x0000018207a8 by main goroutine:
  github.com/nsf/termbox-go.Close()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:156 +0x6ae
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Close()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:163 +0x55
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x230
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104

Previous read at 0x0000018207a8 by goroutine 18:
  github.com/nsf/termbox-go.Flush()
      /Users/nakabonne/go/pkg/mod/github.com/nsf/[email protected]/api.go:208 +0x757
  github.com/mum4k/termdash/terminal/termbox.(*Terminal).Flush()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/terminal/termbox/termbox.go:113 +0x2f
  github.com/mum4k/termdash.(*termdash).redraw()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:278 +0x1bd
  github.com/mum4k/termdash.(*termdash).evRedraw()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:294 +0xa6
  github.com/mum4k/termdash.(*termdash).subscribers.func3()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:230 +0x44
  github.com/mum4k/termdash/private/event.(*subscriber).callback()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:95 +0x5a
  github.com/mum4k/termdash/private/event.(*subscriber).run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:110 +0xd2

Goroutine 18 (running) created at:
  github.com/mum4k/termdash/private/event.newSubscriber()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:89 +0x3cf
  github.com/mum4k/termdash/private/event.(*DistributionSystem).Subscribe()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/private/event/event.go:237 +0x224
  github.com/mum4k/termdash.(*termdash).subscribers()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:226 +0x4ce
  github.com/mum4k/termdash.newTermdash()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:206 +0x2ec
  github.com/mum4k/termdash.Run()
      /Users/nakabonne/go/pkg/mod/github.com/mum4k/[email protected]/termdash.go:106 +0x7a
  github.com/nakabonne/ali/gui.run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:70 +0xa38
  github.com/nakabonne/ali/gui.Run()
      /Users/nakabonne/src/github.com/brenol/ali/gui/gui.go:34 +0x215
  main.(*cli).run()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:117 +0x26c
  main.main()
      /Users/nakabonne/src/github.com/brenol/ali/main.go:60 +0x104
==================
Found 8 data race(s)
exit status 66

reported at #66 (comment)

Scrolling Issue on Info Boxes at Bottom

I ran some tests and the results are too large for the bottom boxes to appear. However the scrolling with mouse or up-down keys doesn't work. This is broken for all boxes at the bottom.
Is it a problem on the UI library? In that case I'll make an issue there if you can tell me which repo.

See below.
SS 2021-03-11T18 40 21

IMO they should also have higher weight when layout-ing so they're not such a small part of graph.

It would be best UX wise to be able to maximise both graph or the boxes at the bottom for further inspection.

"high" CPU usage while idle

it's using 20% CPU while idle here (because of termdash.RedrawInterval).

Perhaps we can use termdash.NewController and only redraw after 250ms, while its running (this will probably bring a lot of complexity?)?

Support keepalive options

  • Enable to switch to use persistent connections

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.