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

Implement the new metrics Reporter #484

Merged
merged 23 commits into from
Apr 12, 2022
Merged

Conversation

jdoe7865623
Copy link
Contributor

This is a work in progress for feedback, migration to the new reporter is not done yet.

The new console stats will tentatively look as follows:

 --- Traffic stats ---
 |            Target | Requests attempted | Requests sent | Responses received | Data sent | Data received |
 | http://foobar.com |               1100 |           110 |                 11 |  17.19 MB |       4.30 MB |
 |  tcp://foobar.com |               1100 |           110 |                 11 |   1.72 MB |       0.43 MB |
 |               --- |                --- |           --- |                --- |       --- |           --- |
 |             Total |               2200 |           220 |                 22 |  18.91 MB |       4.73 MB |

@roman-kruglov
Copy link
Contributor

Hi! I thought about something similar too, to better inform the user about the results and thus efficiency. So I had one more thought - maybe it should somehow specify summarised response codes and something like closed / rejected connections. And maybe some efficiency coefficient. No idea how to calculate it, but it would be great - e.g. to try different VPNs / servers. What do you think? (yes, I'm willing to participate in coding, just trying to cooperate because I found your pr which seems close to something I would do, so I decided to write here first).

@roman-kruglov
Copy link
Contributor

roman-kruglov commented Apr 6, 2022

Also had an idea to replace those tons of duplicated repetitive messages about starting a thread for a target like

2022/04/06 17:07:48.414177 http.go:147: Attacking **sample**
2022/04/06 17:07:48.414892 http.go:147: Attacking **sample**
2022/04/06 17:07:48.415018 http.go:147: Attacking **sample**
2022/04/06 17:07:48.415130 http.go:147: Attacking **sample**
2022/04/06 17:07:48.415163 http.go:147: Attacking **sample**

with something more combined and shorter, like maybe

2022/04/06 17:07:48.414177 http.go:147: Attacking (30 threads) https://**sample**
2022/04/06 17:07:48.414892 http.go:147: Attacking (20 threads) https://**sample**
etc

would be much shorter and easier to follow

@jdoe7865623
Copy link
Contributor Author

Hi! I thought about something similar too, to better inform the user about the results and thus efficiency. So I had one more thought - maybe it should somehow specify summarised response codes and something like closed / rejected connections. And maybe some efficiency coefficient. No idea how to calculate it, but it would be great - e.g. to try different VPNs / servers. What do you think? (yes, I'm willing to participate in coding, just trying to cooperate because I found your pr which seems close to something I would do, so I decided to write here first).

Fair enough; we can't summarize by response codes since there are different protocols involved - not only HTTP. This is why I thought of the five metrics you can see in the table as a common denominator of sorts. Collecting these metrics from all supported jobs is still a WIP.

You may define "efficiency" as a ratio between the responses received and requests attempted (or sent). But this is somewhat subjective (what if the target is down due to the swarm activity? :), so I decided to start with plain stats. I'm open to suggestions, though.

@jdoe7865623
Copy link
Contributor Author

Also had an idea to replace those tons of duplicated repetitive messages about starting a thread for a target like

2022/04/06 17:07:48.414177 http.go:147: Attacking https://kupiprodai.ru
2022/04/06 17:07:48.414892 http.go:147: Attacking https://kupiprodai.ru
2022/04/06 17:07:48.415018 http.go:147: Attacking http://kupiprodai.ru
2022/04/06 17:07:48.415130 http.go:147: Attacking https://kupiprodai.ru
2022/04/06 17:07:48.415163 http.go:147: Attacking http://kupiprodai.ru

with something more combined and shorter, like maybe

2022/04/06 17:07:48.414177 http.go:147: Attacking (30 threads) https://kupiprodai.ru
2022/04/06 17:07:48.414892 http.go:147: Attacking (20 threads) https://rudos.ru
etc

would be much shorter and easier to follow

Yeah, those are not super-helpful at this point. The runner does not know much about the specific job config, though, thus we log this stuff from within the jobs in coroutines. That causes a barrage of identical messages. Feel free to submit a PR if you come up with a smart suggestion :)

@roman-kruglov
Copy link
Contributor

ok, yep, I'll try. I have several small ideas to start from.

src/job/http.go Outdated Show resolved Hide resolved
@jdoe7865623 jdoe7865623 changed the title WIP: Implement the new metrics Reporter Implement the new metrics Reporter Apr 10, 2022
src/utils/metrics/metrics.go Show resolved Hide resolved
src/utils/metrics/metrics-old.go Outdated Show resolved Hide resolved
src/utils/metrics/metrics.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants