six-ddc / plow

A high-performance HTTP benchmarking tool that includes a real-time web UI and terminal display
Apache License 2.0
4.11k stars 140 forks source link

Not working for https://astro.build/ project #104

Open khanakia opened 3 months ago

khanakia commented 3 months ago

When i do get the page using the CURL command it works perfectly with the plow command it just throws the errors as below

Benchmarking http://localhost:4321 using 1 connection(s).
@ Real-time charts is listening on http://[::]:18888

Summary:
  Elapsed       6.3s
  Count       198140
  RPS      30973.209
  Reads    0.000MB/s
  Writes   0.000MB/s

Error:
  198140  "dial tcp4 127.0.0.1:4321: connect: connection refused"

Statistics    Min       Mean    StdDev    Max   
  Latency     19µs      31µs    170µs   33.864ms
  RPS       29891.75  30919.29  680.36  31722.55

Latency Percentile:
  P50   P75   P90   P95   P99   P99.9  P99.99
  29µs  32µs  35µs  38µs  56µs  149µs  1.33ms

Latency Histogram:
  28µs      149024  75.21%
  31µs       33426  16.87%
  36µs       12556   6.34%
  53µs        2758   1.39%
  138µs        336   0.17%
  1.983ms       34   0.02%
  21.177ms       4   0.00%
  33.323ms       2   0.00%
six-ddc commented 3 months ago

The error message 'connection refused' usually indicates an issue with the service, not the tool. Please ensure the service is running and verify the IP address and port.

khanakia commented 3 months ago

I double that there is no issue with the service I just installed a fresh astro site (https://docs.astro.build/en/getting-started/) which runs over this URL http://localhost:4321 only plow is giving a connection refused issue

I can access the site using curl and in a web browser

curl http://localhost:4321

Screenshot 2024-06-19 at 11 43 56 AM

Screenshot 2024-06-19 at 11 44 08 AM

khanakia commented 3 months ago

Fond the issue plow is resolving to the IP address instead of localhost

When I want to test http://localhost:4321 it tries to connect via IP 127.0.0.1:4321 but my site is running over localhost so you cannot access it over http://127.0.0.1:4321/

It should use localhost instead of using 127.0.0.1

six-ddc commented 3 months ago

The reason might be that localhost is resolving to the address ::1, and it looks like Plow has some issues supporting IPv6.