-
Notifications
You must be signed in to change notification settings - Fork 251
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
#164 Fortio remote test URL shouldn't require the percentiles list #179
Conversation
sorry the idea of #164 isn't not to deal with nil; that part works fine; the idea is that the UI should have the same default as fortio_main |
Ah okay. |
the test for success is: fortio server & then hit it should do "50, 75, 90, 99, 99.9" percentiles; it doesn't now |
I have tested to see the case, but it works. You can see the result json below. Percentiles are seen on DurationHistogram data. {
"Labels": "Fortio",
"StartTime": "2018-03-05T23:33:42.873072921+03:00",
"RequestedQPS": "1000",
"RequestedDuration": "3s",
"ActualQPS": 571.8950653941345,
"ActualDuration": 3012790465,
"NumThreads": 8,
"Version": "0.7.3-pre",
"DurationHistogram": {
"Count": 1723,
"Min": 0.001372129,
"Max": 0.056114808,
"Sum": 22.966513984000002,
"Avg": 0.013329375498549043,
"StdDev": 0.006322253301454129,
"Data": [
{
"Start": 0.001372129,
"End": 0.0014,
"Percent": 0.05803830528148578,
"Count": 1
},
{
"Start": 0.0016,
"End": 0.0018000000000000002,
"Percent": 0.2321532211259431,
"Count": 3
},
{
"Start": 0.002,
"End": 0.0025,
"Percent": 0.522344747533372,
"Count": 5
},
{
"Start": 0.0025,
"End": 0.003,
"Percent": 0.6964596633778294,
"Count": 3
},
{
"Start": 0.003,
"End": 0.0035,
"Percent": 0.7544979686593152,
"Count": 1
},
{
"Start": 0.0035,
"End": 0.004,
"Percent": 0.8705745792222868,
"Count": 2
},
{
"Start": 0.004,
"End": 0.0045000000000000005,
"Percent": 1.10272780034823,
"Count": 4
},
{
"Start": 0.0045000000000000005,
"End": 0.005,
"Percent": 1.7991874637260592,
"Count": 12
},
{
"Start": 0.005,
"End": 0.006,
"Percent": 2.7858386535113175,
"Count": 17
},
{
"Start": 0.006,
"End": 0.007,
"Percent": 5.62971561230412,
"Count": 49
},
{
"Start": 0.007,
"End": 0.008,
"Percent": 14.103308183401044,
"Count": 146
},
{
"Start": 0.008,
"End": 0.009000000000000001,
"Percent": 23.447475333720256,
"Count": 161
},
{
"Start": 0.009000000000000001,
"End": 0.01,
"Percent": 32.84968078932095,
"Count": 162
},
{
"Start": 0.01,
"End": 0.012,
"Percent": 50.435287289611146,
"Count": 303
},
{
"Start": 0.012,
"End": 0.014,
"Percent": 65.00290191526408,
"Count": 251
},
{
"Start": 0.014,
"End": 0.016,
"Percent": 75.97214161346488,
"Count": 189
},
{
"Start": 0.016,
"End": 0.018000000000000002,
"Percent": 84.32965757399884,
"Count": 144
},
{
"Start": 0.018000000000000002,
"End": 0.02,
"Percent": 90.71387115496228,
"Count": 110
},
{
"Start": 0.02,
"End": 0.025,
"Percent": 94.6604759141033,
"Count": 68
},
{
"Start": 0.025,
"End": 0.030000000000000002,
"Percent": 96.57573998839234,
"Count": 33
},
{
"Start": 0.030000000000000002,
"End": 0.035,
"Percent": 98.3749274521184,
"Count": 31
},
{
"Start": 0.035,
"End": 0.04,
"Percent": 99.41961694718515,
"Count": 18
},
{
"Start": 0.04,
"End": 0.045000000000000005,
"Percent": 99.53569355774812,
"Count": 2
},
{
"Start": 0.045000000000000005,
"End": 0.05,
"Percent": 99.94196169471851,
"Count": 7
},
{
"Start": 0.05,
"End": 0.056114808,
"Percent": 100,
"Count": 1
}
],
"Percentiles": [
{
"Percentile": 50,
"Value": 0.01195049504950495
},
{
"Percentile": 75,
"Value": 0.01582275132275132
},
{
"Percentile": 90,
"Value": 0.019776363636363637
},
{
"Percentile": 99,
"Value": 0.03799166666666665
},
{
"Percentile": 99.9,
"Value": 0.04948357142857149
}
]
},
"Exactly": 0,
"RetCodes": {
"200": 1723
},
"Sizes": {
"Count": 1723,
"Min": 1998,
"Max": 2002,
"Sum": 3448072,
"Avg": 2001.2025536854323,
"StdDev": 0.8234479988395258,
"Data": [
{
"Start": 1998,
"End": 2000,
"Percent": 13.116656993615786,
"Count": 226
},
{
"Start": 2000,
"End": 2002,
"Percent": 100,
"Count": 1497
}
],
"Percentiles": null
},
"HeaderSizes": {
"Count": 1723,
"Min": 124,
"Max": 124,
"Sum": 213652,
"Avg": 124,
"StdDev": 0,
"Data": [
{
"Start": 124,
"End": 124,
"Percent": 100,
"Count": 1723
}
],
"Percentiles": null
},
"URL": "http://localhost:8186/fortio/?labels=Fortio\u0026url=http%253A%252F%252Flocalhost%253A8080%252Fecho\u0026t=3s\u0026qps=1000\u0026save=on\u0026r=0.0001\u0026load=Start",
"SocketCount": 9
} Are you asking for Sizes and HeaderSizes datas? |
no, this:
|
Codecov Report
@@ Coverage Diff @@
## master #179 +/- ##
========================================
- Coverage 90.9% 90.7% -0.3%
========================================
Files 10 10
Lines 1643 1670 +27
========================================
+ Hits 1494 1514 +20
- Misses 100 104 +4
- Partials 49 52 +3
Continue to review full report at Codecov.
|
The error is interesting. How does that happen |
to test:
I doubt that the pr works given what/where you made a change ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
I have tested 4 case that you have mentioned, the test cases works. I think, #164 is already solved. The changes that I have done, are unnecessary. I thought that when you say "Percentiles": null, you were talking about HeaderSizes's percentile and Size's percentile. |
the code in this pr is unrelated to what needs to be solved one more time; with the url in #179 (comment) what is missing is:
or in json:
|
Ah I see now, I were putting URL that you shared with me to fortio UI's URL field instead of putting it to browser url. Sorry |
ping :) |
this is good, you just need to undo your vendor change: and I need to check how come the build doesn't check that |
#201 fixed the issue that your pr didn't trigger a build failure when it should have, now it does |
ui/uihandler.go
Outdated
@@ -183,6 +185,9 @@ func Handler(w http.ResponseWriter, r *http.Request) { | |||
log.Fatalf("expected http.ResponseWriter to be an http.Flusher") | |||
} | |||
out := io.Writer(os.Stderr) | |||
if len(percList) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make the difference between p= isn't provided, in which case we use defaults and p= is empty in which case we should respect the will of the caller to not calculate any % ?
(minor so maybe this can go in as is without that complete fix)
Gopkg.lock
Outdated
@@ -2,58 +2,1081 @@ | |||
|
|||
|
|||
[[projects]] | |||
name = "cloud.google.com/go" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahem NO please do not change Gopkg.lock (nor vendor)
ui/uihandler.go
Outdated
@@ -183,6 +185,9 @@ func Handler(w http.ResponseWriter, r *http.Request) { | |||
log.Fatalf("expected http.ResponseWriter to be an http.Flusher") | |||
} | |||
out := io.Writer(os.Stderr) | |||
if len(percList) == 0 && !strings.Contains(r.URL.RawQuery,"p=") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, that's creative and will do ! thanks!
I mess up about vendor. |
are you having difficulties with please tell me exactly what doesn't work so I can improve the instructions on how to fix vendor when you accidentally changed it then we can merge this |
please make sure to resolve "This branch is out-of-date with the base branch" first (click the button for instance, or do it on your local copy) |
When I use git submodule update. There are three diffs occurred. I was expecting that only vendor to be diff. |
ps: replace https://github.com/istio/istio.git by https://github.com/istio/fortio.git in the instructions! the wiki is for istio but it's same setup here |
…rtio into EmptyPercentilesList
awesome thanks! |
I think it is okay now :). Thanks |
a test would have been great too but this is ok, I'll test it later |
I can add unit test tomorrow. |
hmm not sure why the linters aren't happy, some whitespace issue maybe? |
Yes, while I was reverse committing. I made white space mistake. |
removing extra white space
HistogramData will be experted with empty percentile array to avoid null in json. Also test is added for this.