Code Monkey home page Code Monkey logo

gcping's Introduction

gcping

Build Status

gcpping is both a command line tool and a webapp that reports median latency to Google Cloud regions. The webapp is hosted at gcping.com. To install the command line tool, see below.

Note: This is not an official Google product.

CLI Usage

gcping [options...]

Options:
-n       Number of requests to be made to each region.
         By default 10; can't be negative.
-c       Max number of requests to be made at any time.
         By default 10; can't be negative or zero.
-r       Report latency for an individual region.
-t       Timeout. By default, no timeout.
         Examples: "500ms", "1s", "1s500ms".
-top     If true, only the top (non-global) region is printed.
-csv-cum If true, cumulative value is printed in CSV; disables default report.
-url     URL of endpoint list. Default is https://global.gcping.com/api/endpoints

-csv     CSV output; disables verbose output.
-v       Verbose output.

Need a website version? See gcping.com

An example output:

$ gcping
 1.  [global]                   11.17568ms
 2.  [us-central1]              12.373109ms
 3.  [us-west3]                 29.203499ms
 4.  [northamerica-northeast2]  30.615139ms
 5.  [us-east4]                 33.401098ms
 6.  [northamerica-northeast1]  38.612769ms
 7.  [us-west1]                 43.041808ms
 8.  [us-east1]                 46.847258ms
 9.  [us-west4]                 53.438688ms
10.  [us-west2]                 57.659108ms
11.  [europe-west2]             103.371016ms
12.  [europe-west4]             111.966565ms
13.  [europe-west1]             112.327356ms
14.  [europe-west3]             114.245525ms
15.  [europe-west6]             118.966225ms
16.  [europe-central2]          128.008935ms
17.  [europe-north1]            136.796505ms
18.  [asia-northeast1]          142.480775ms
19.  [southamerica-east1]       147.324384ms
20.  [asia-northeast2]          156.088594ms
21.  [asia-northeast3]          168.205243ms
22.  [asia-east2]               170.763954ms
23.  [australia-southeast2]     188.310153ms
24.  [southamerica-west1]       206.412352ms
25.  [asia-southeast2]          210.029872ms
26.  [asia-south1]              256.2628ms
27.  [asia-south2]              276.434709ms
28.  [australia-southeast1]     396.915245ms
29.  [asia-east1]               417.147963ms
30.  [asia-southeast1]          496.648151ms
$ gcping -r us-east1
502.068712ms
$ gcping -top
us-west2

Installation

We build binaries for the following OS's and architectures:

Installation looks something like this (changing the URL for your system):

curl https://storage.googleapis.com/gcping-release/gcping_linux_amd64_latest > gcping && chmod +x gcping

gcping's People

Contributors

444b avatar alapiere avatar apstndb avatar ayang64 avatar crwilcox avatar dastergon avatar dependabot[bot] avatar enocom avatar helloworlddan avatar imjasonh avatar jquinter avatar kkr16 avatar orthros avatar rakyll avatar saranshdhingra avatar teivah avatar wietsevenema avatar yuryu avatar zchee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcping's Issues

Make `gcping` and gcping.com use the same method to calculate latency

It looks like this tool reports the mean time for a network roundtrip, whereas gcping.com reports the one-way latency. That's a bit confusing..

I have no strong opinion what is better, but it would be nice to mention this difference. Alternatively, the tool and website could align their measurement methods.

Move stylesheets and js into separate files

Can we move the stylesheets and js code into separate files (.css and .js) instead of having everything in index.html? I can make a PR if this makes sense. It will make future development a bit easier.

Use an asset bundler

After 155e434, we'll need to be aware of how clients cache assets. An asset bundler would help with this and open the door to more client-side options (TypeScript, wider browser support, SASS, etc). Parcel is a good option: https://parceljs.org/docs/.

-top can suggest a zone

Currently, -top only returns the region name. It would be great if we can return a zone name from gcping. Then, the user can create a VM in the closest region via:

gcloud compute instance create -zone $(gcping -top) vm

@imjasonh, this was your initial idea. Did you avoid implementing it for some reason?

Staged Cloud Run not being deleted on PR merge

Found a bug in the PR Close Github Action workflow where the staged Cloud Run service is not automatically deleted if the PR is merged. In case the PR is closed without a merge, then the staged Cloud Run services are deleted without issues.

Add Paris region

Hello,

According to the release note (link here) Paris is a new available region in GCP.

Please introduce release tags / versions

Hello,
please introduce release tags and versions to support stable usage, development of a homebrew formula or similiar stuff.

What do you think about that?

Update repo About snippet

It's still focused on the CLI tool and not both the CLI and the website.

Screen Shot 2021-07-26 at 4 07 33 PM

I don't have permission to update it myself, or else I would ๐Ÿ˜„

gcping cli giving errors

gcping cli is giving errors even though the latency is calculated:

~ ./gcping
 1.  [global]                   19.290805ms   (10 errors)
 2.  [northamerica-northeast1]  29.315077ms   (10 errors)
 3.  [northamerica-northeast2]  37.393744ms   (10 errors)
 4.  [us-east4]                 43.906334ms   (10 errors)
 5.  [us-east1]                 57.958502ms   (10 errors)
 6.  [us-central1]              61.14016ms    (10 errors)
 7.  [us-west3]                 79.048424ms   (10 errors)
 8.  [us-west1]                 91.947432ms   (10 errors)
 9.  [us-west4]                 97.665239ms   (10 errors)
10.  [us-west2]                 100.457459ms  (10 errors)
11.  [europe-west2]             108.615476ms  (10 errors)
12.  [europe-west1]             114.749269ms  (10 errors)
13.  [europe-west4]             116.063112ms  (10 errors)
14.  [europe-west3]             117.671764ms  (10 errors)
15.  [europe-west6]             124.095288ms  (10 errors)
16.  [europe-north1]            147.881739ms  (10 errors)
17.  [southamerica-east1]       155.535941ms  (10 errors)
18.  [europe-central2]          156.961643ms  (10 errors)
19.  [asia-northeast1]          181.900837ms  (10 errors)
20.  [asia-northeast2]          195.192893ms  (10 errors)
21.  [asia-northeast3]          203.282024ms  (10 errors)
22.  [asia-east1]               209.312694ms  (10 errors)
23.  [asia-east2]               219.646245ms  (10 errors)
24.  [australia-southeast1]     227.270432ms  (10 errors)
25.  [asia-southeast1]          243.766738ms  (10 errors)
26.  [asia-southeast2]          253.509767ms  (10 errors)
27.  [asia-south1]              306.502457ms  (10 errors)
28.  [asia-south2]              409.837682ms  (10 errors)
29.  [australia-southeast2]     674.204148ms  (10 errors) 

Add US-SOUTH1 Dallas Region

I ran your GCPing.com tool today for the first time to see what my latency would be like to Dallas (US-SOUTH1) and noticed it hasn't been included in your list yet. Can you please add this region when you have a chance? Thank you!

Terraform fails if /etc/hosts doesn't contain IPv4 addrs

Currently, terraform can fail due to a misconfig of addrs. It would be better if this could be added to our terraform.

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 > /dev/null
export APIS="googleapis.com www.googleapis.com storage.googleapis.com iam.googleapis.com container.googleapis.com cloudresourcemanager.googleapis.com run.googleapis.com iam.googleapis.com asia-east2-run.googleapis.com southamerica-east1.googleapis.com asia-south1-run.googleapis.com europe-west2-run.googleapis.com australia-southeast2-run.googleapis.com europe-north1-run.googleapis.com europe-west3-run.googleapis.com southamerica-east1-run.googleapis.com asia-southeast1-run.googleapis.com asia-northeast1-run.googleapis.com us-west3-run.googleapis.com us-central1-run.googleapis.com asia-northest2-run.googleapis.com us-east4-run.googleapis.com australia-southeast1-run.googleapis.com us-east4-run.googleapis.com europe-west3-run.googleapis.com"
for name in $APIS
do
  ipv4=$(getent ahostsv4 "$name" | head -n 1 | awk '{ print $1 }')
  grep -q "$name" /etc/hosts || ([ -n "$ipv4" ] && sudo sh -c "echo '$ipv4 $name' >> /etc/hosts")
done

Repro:

terraform plan \
    --var="image=gcr.io/gcping-devrel/ping-b5e9c300f5e9cdafa118e623a88e6b97@sha256:14ae944d9449281f08e2dfb4abac70ec43429f7fcb3e47dba3ad750a7842b53a" \
    --var='domain=gcping.com' \
    --var='project=gcping-devrel'

IMCP/TCP latency test

Hi, I know this tool was made to benchmark HTTP request latency but I'd like to have the same feature but with ICMP or TCP requests. Hosting a VPN server or such thing on GCP is really different than hosting a web server and it doesn't work the same way. Is it already possible to benchmark latency with something else than HTTP?

Thanks

CLI cannot be installed (bucket was deleted)

GCPing is broken as the project associated with the bucket was deleted:

curl https://storage.googleapis.com/gcping-release/gcping_linux_amd64_0.0.3 > gcping && chmod +x gcping

./gcping: line 1: ProjectNotFoundThe requested project was not found.

The requested project was not found.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.