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

#164 Fortio remote test URL shouldn't require the percentiles list #179

Merged
merged 23 commits into from
Mar 13, 2018

Conversation

olimpias
Copy link
Collaborator

@olimpias olimpias commented Mar 5, 2018

HistogramData will be experted with empty percentile array to avoid null in json. Also test is added for this.

@ldemailly
Copy link
Member

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

@olimpias
Copy link
Collaborator Author

olimpias commented Mar 5, 2018

Ah okay.

@ldemailly
Copy link
Member

the test for success is:

fortio server &

then hit

http://localhost:8080/fortio/?labels=Fortio&url=http%3A%2F%2Flocalhost%3A8080%2Fecho&t=3s&qps=1000&save=on&r=0.0001&load=Start

it should do "50, 75, 90, 99, 99.9" percentiles; it doesn't now

@olimpias
Copy link
Collaborator Author

olimpias commented Mar 5, 2018

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?

@ldemailly
Copy link
Member

no, this:

"Percentiles": null

@codecov
Copy link

codecov bot commented Mar 6, 2018

Codecov Report

Merging #179 into master will decrease coverage by 0.3%.
The diff coverage is n/a.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
fgrpc/grpcrunner.go 85.1% <0%> (-4.9%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2921513...86e8429. Read the comment docs.

@olimpias
Copy link
Collaborator Author

olimpias commented Mar 6, 2018

The error is interesting. How does that happen

@ldemailly
Copy link
Member

ldemailly commented Mar 6, 2018

to test:

  • use the UI, change the values; say use "63, 81" and check you get p63 and p81 results
  • use the url above, check you get the 5 defaults
  • use the command line tool; check you get the 5 defaults
  • use the command line tool; pass -p check it works (e.g fortio load -p "63,81" www.google.com)

I doubt that the pr works given what/where you made a change ?
( circle linter spurious error is #178 )

Copy link
Member

@ldemailly ldemailly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

@olimpias
Copy link
Collaborator Author

olimpias commented Mar 7, 2018

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.

@ldemailly
Copy link
Member

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:

# target 50% 0.000371099
# target 75% 0.000461104
# target 90% 0.000540346
# target 99% 0.0007125
# target 99.9% 0.0012293

or in json:

   "Percentiles": [
      {
        "Percentile": 50,
        "Value": 0.0003710989010989011
      },
      {
        "Percentile": 75,
        "Value": 0.00046110414052697617
      },
      {
        "Percentile": 90,
        "Value": 0.0005403458213256485
      },
      {
        "Percentile": 99,
        "Value": 0.0007124999999999994
      },
      {
        "Percentile": 99.9,
        "Value": 0.0012293028000000038
      }

or on UI:
screen shot 2018-03-07 at 11 39 09 am
vs
screen shot 2018-03-07 at 11 39 39 am

@olimpias
Copy link
Collaborator Author

olimpias commented Mar 7, 2018

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

@ldemailly
Copy link
Member

ping :)

@ldemailly
Copy link
Member

this is good, you just need to undo your vendor change:
https://github.com/istio/istio/wiki/Vendor-FAQ#i-did-something-and-now-my-pr-has-a-vendor-change-how-do-i-fix-it-

and I need to check how come the build doesn't check that

@ldemailly
Copy link
Member

#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 {
Copy link
Member

@ldemailly ldemailly Mar 12, 2018

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)

cem turker added 3 commits March 13, 2018 10:14
Gopkg.lock Outdated
@@ -2,58 +2,1081 @@


[[projects]]
name = "cloud.google.com/go"
Copy link
Member

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=") {
Copy link
Member

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!

@olimpias
Copy link
Collaborator Author

I mess up about vendor.

@ldemailly
Copy link
Member

are you having difficulties with
https://github.com/istio/istio/wiki/Vendor-FAQ#i-did-something-and-now-my-pr-has-a-vendor-change-how-do-i-fix-it-

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

@ldemailly
Copy link
Member

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)

@olimpias
Copy link
Collaborator Author

When I use git submodule update. There are three diffs occurred. I was expecting that only vendor to be diff.

@ldemailly
Copy link
Member

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

@ldemailly
Copy link
Member

awesome thanks!

@olimpias
Copy link
Collaborator Author

I think it is okay now :). Thanks

@ldemailly
Copy link
Member

a test would have been great too but this is ok, I'll test it later

@olimpias
Copy link
Collaborator Author

I can add unit test tomorrow.

@ldemailly
Copy link
Member

hmm not sure why the linters aren't happy, some whitespace issue maybe?

@olimpias
Copy link
Collaborator Author

Yes, while I was reverse committing. I made white space mistake.

removing extra white space
@ldemailly ldemailly merged commit f7c66a7 into fortio:master Mar 13, 2018
@olimpias olimpias deleted the EmptyPercentilesList branch March 13, 2018 07:55
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.

2 participants