Coder Social home page Coder Social logo

xxdesmus / npm-benchmark-execs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meonkeys/npm-benchmark-execs

0.0 1.0 0.0 136 KB

Benchmark two ways to fetch the current machine's public IP address from the command-line.

License: GNU Affero General Public License v3.0

JavaScript 100.00%

npm-benchmark-execs's Introduction

Benchmark two "get my IP" commands

Benchmark two ways to fetch the current machine's public IP address from the command-line.

Setup: install Node.js and npm. Execute npm install to fetch dependencies.

index.js is the real test. Run it with node index.js. Example output:

HTTP x 5.19 ops/sec ±7.38% (31 runs sampled)
DNS x 17.48 ops/sec ±5.02% (48 runs sampled)
Fastest is DNS

That's from a 4-core 1.80GHz Intel Core i3 laptop running 64-bit Ubuntu 14.04.02 LTS.

"HTTP" measures curl http://canhazip.com.

"DNS" measures dig +short myip.opendns.com @resolver1.opendns.com.

simple.js is a simple "control" to show that the way I'm benchmarking more or less makes sense. Output should show that sleep one second takes one second to run and is twice as fast as sleep two seconds. Example output:

sleep two seconds x 0.50 ops/sec ±0.16% (7 runs sampled)
sleep one second x 0.99 ops/sec ±0.15% (9 runs sampled)
Fastest is sleep one second

See also

Mirrors

Copyright, License

Copyright (C)2015 Adam Monsen.

License: AGPL v3. See COPYING for details.

npm-benchmark-execs's People

Contributors

meonkeys avatar

Watchers

 avatar

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.