Giter VIP home page Giter VIP logo

pydwnldr's Introduction

Multi threaded downloader in Python 2.7 using concurrent.futures

Single thread

rkadam@rkadam-vbox:~/github/pydwnldr/src$ time wget http://ubuntu.mirrors.tds.net/pub/releases/15.10/ubuntu-15.10-desktop-amd64.iso
--2016-01-28 15:47:20--  http://ubuntu.mirrors.tds.net/pub/releases/15.10/ubuntu-15.10-desktop-amd64.iso
Resolving ubuntu.mirrors.tds.net (ubuntu.mirrors.tds.net)... 64.50.236.222
Connecting to ubuntu.mirrors.tds.net (ubuntu.mirrors.tds.net)|64.50.236.222|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1178386432 (1.1G) [application/octet-stream]
Saving to: ‘ubuntu-15.10-desktop-amd64.iso’

ubuntu-15.10-desktop-amd64.iso            100%[======================================================================================>]   1.10G   844KB/s   in 22m 49ss

2016-01-28 16:10:09 (840 KB/s) - ‘ubuntu-15.10-desktop-amd64.iso’ saved [1178386432/1178386432]


real    22m49.513s
user    0m0.180s
sys     0m29.884s

4 Threads

(pydwnldr)rkadam@rkadam-vbox:~/github/pydwnldr/src$ time python dwnldr.py http://ubuntu.mirrors.tds.net/pub/releases/15.10/ubuntu-15.10-desktop-amd64.iso
Downloading ubuntu-15.10-desktop-amd64.iso 1178386432 bytes

real    5m53.696s
user    0m0.764s
sys     0m32.244s

8 Threads

(pydwnldr)rkadam@rkadam-vbox:~/github/pydwnldr/src$ time python dwnldr.py http://ubuntu.mirrors.tds.net/pub/releases/15.10/ubuntu-15.10-desktop-amd64.iso
Downloading ubuntu-15.10-desktop-amd64.iso 1178386432 bytes

real    3m2.407s
user    0m1.040s
sys     0m36.796s

pydwnldr's People

Contributors

rklabs avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nitinks

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.