-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog
More file actions
98 lines (74 loc) · 4.65 KB
/
Log
File metadata and controls
98 lines (74 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
In order to not lose track of what I'm doing, I've decided to start a log:
1- I have implemented a basicAb: this one simply makes a request and returns tps, latency and whether it was a failure or not.
2- I am implementing the actual ab.
--------------------26/1
21:51-> added the -n flag recognition
Turns out that in order to make it work you have to use:
go run . <address> -n 100
instead of the expected
go run . -n 100 <address>
I will look onto that later.
--------------------27/1
11:00-> Started to work on the -n actual implementation.
Once I am done with this I want to clean the code and
udate the readme with the results of exercise 1
I also want to add some error handling routines.
12:15 -> I can't seem to get the flag to business work. I'm not sure what is wrong. Reference: https://gobyexample.com/command-line-flags
12:44 -> Finally made it work. I also managed to put the flags in their
right places. Now I have to make it so it sends the number of requests
I specify.
17:00 -> The -n flag seems to be working fine. Now I'm going to improve the code documentation and work into some error handling aspects. I will also need to work in the readme a little bit more.
18:12 -> I've already improved the code documentation and the error handling aspects. Now I'm going to focus on improving the readme a bit more.
19:30 -> Updated readme with the results for excercise 1.
19:35 -> decided to try to finally run my goab program and compare it with the ab on my nginx server
ab -n 5000 http://<IP>/
go run . -n 5000 http://<IP>/
BUG:
The results for ab were right... but the ones for go were...:
2021/01/27 20:03:03 Mean latency: 0.000000 ms
2021/01/27 20:03:03 Mean TPS: +Inf
2021/01/27 20:03:03 Successful connections: 5000.000000
I might have misunderstood the problem? I'm going to check
20:00 -> It seems to work with other url's but not with the one from my own server
20:30 -> both ab and my own implementation are very slow. I think it is best if I first focus on making my own implementation work properly.
28/01
11:00 -> I decide to test ab and goab with less -n, the results are extremelly different: did I get the whole thing wrong? I have decided to take some time to sit down and see if I clearly understood the problem.
Concurrency Level: 1
Time taken for tests: 209.292 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 6602482 bytes
HTML transferred: 6147000 bytes
Requests per second: 4.78 [#/sec] (mean)
Time per request: 209.292 [ms] (mean)
Time per request: 209.292 [ms] (mean, across all concurrent requests)
Transfer rate: 30.81 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 94 154 42.5 148 686
Processing: 31 55 28.8 50 462
Waiting: 31 55 28.7 50 462
Total: 126 209 58.7 201 763
go run . -n 1000 https://gobyexample.com/command-line-arguments
2021/01/28 11:27:03 Mean latency: 47.276000 ms
2021/01/28 11:27:03 Mean TPS: 22.494484
2021/01/28 11:27:03 Successful connections: 1000.000000
12:00 -> Does the division in go language works as in c++? When I do 1000/param1+param2+param3 gives Inf+, but it gives the actual result with 1000/(p1+p2+p3)
12:45 -> Can't figure out what is going on. I'm going to try something a little bit different. Instead of using httpstat, I'm going to calculate the tps by my own hand using Time.now()
13:00 -> Using the Time.now() yields the same exact results as using httpstat. Maybe I am badly interpreting the ab mesaurements?
13:20 -> What if I try to get the minimum and the maximum and compare those? Undertanding what exactly is TPS and the Latency and how it correlates to the ab results is my problem here, so let's keep it simple, shall we?
13:30 WHy is the ab so slow...? am I forgetting to add something to the mesaurementes of goab?
ab
Connection Times (ms)
min mean[+/-sd] median max
Connect: 95 151 30.8 150 511
Processing: 31 55 80.0 50 2076
Waiting: 30 53 48.0 50 1436
Total: 127 206 88.0 202 2255
goab
2021/01/28 13:35:53 MINIMUM: 50.000000 ms
2021/01/28 13:35:53 MAXIMUM: 225.000000
2021/01/28 13:35:53 Mean latency: 58.143000 ms
13:45 Later I will try to estimate the requests per second with my program,
if the results are similar to the ones from AB, it means I've got this all wrong and the program is actually right, I just don't seem to undertand what TPS means.
17:00 I've realized that the calculations for the number of requests per second is right. Then, I guess it's different to TPS? Or does ab makes a whole different kind of transactions?