nakabonne / ali Goto Github PK
View Code? Open in Web Editor NEWGenerate HTTP load and plot the results in real-time
License: MIT License
Generate HTTP load and plot the results in real-time
License: MIT License
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.
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.
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.
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.
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.
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
Give buckets as:
ali --buckets "1ms, 10ms, 100ms, 500ms" http://host.xz
Then drawn as a bar chart:
https://github.com/mum4k/termdash/blob/master/doc/images/barchartdemo.gif
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.
-c
or --connections
Only tiny changes are required because all we have to do is just pass to the Vegeta API.
ali -r 0 -d 2s http://host.xz
It's probably due to the time it takes to draw to all the charts. Maybe we should each spawn goroutine.
Lines 66 to 84 in 2711e42
Just add a chart as same as latency, percentile.
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?
To support more options, need to be expandable.
--local-addr
Only tiny changes are required because all we have to do is just pass to the Vegeta API.
Whenever we do:
-race
optionEnter
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)
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
```
`
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)
I'm getting a panic when trying to send a body, using the docker image.
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?)?
Excuse me?
How does this tool test 500 concurrent requests for URLs? You need to look at those parameters
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 containerdocker run --rm -it --network=host nakabonne/ali ali example.com
with a modified hosts
file on the docker hostbut none of the above worked for me. Instead, ali
would always hit the original server.
Fun tool! It would be great if http basic auth would be supported via cli as well
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.
Only tiny changes are required because all we have to do is just pass to the Vegeta API.
@markruler has been worked on this to use tcell, but something is still missing (#56).
-B
or --max-body
.Only tiny changes are required because all we have to do is just pass to the Vegeta API.
Only tiny changes are required because all we have to do is just pass to the Vegeta API.
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
.
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.
Cause
Since the map is iterated to build a string.
Lines 217 to 230 in 1329145
What RedrawInterval is being constant is a problem. Support the --redraw-interval
option to make it configurable.
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.
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):
Perhaps we can use time.RFC3339Nano?
Or some middleground, without the T:
Or without millis/nanos and aligned:
Or with millis/nanos, aligned, without monotonic:
And (I know I'm talking mostly about date but...) with everything aligned:
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.
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:
Line 218 in 6abc270
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.
$ go test
# github.com/nakabonne/ali
./main.go:32:3: Fprintln arg list ends with redundant newline
FAIL github.com/nakabonne/ali [build failed]
Hello there
I got this curl command which post some form-data
curl -iL -X POST "http://127.0.0.1:4001/get_sep_data/" -H "accept: application/json" -H "Authorization: Bearer XXXXXXXX" -H "Content-Type: multipart/form-data" -F "url_1=https://i.ytimg.com/vi/-TnUwv9i-4g/maxresdefault.jpg"
How do I do this with Ali?
Thank you
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?
ali/gui/keybinds.go:36
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?
-w
or --workers
-W
or --max-workers
Only tiny changes are required because all we have to do is just pass to the Vegeta API.
To i.e. allow mutual tls, adding root certificates and to allow for tls verification
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.