Code Monkey home page Code Monkey logo

ipdb's Introduction

IP Database

Create IP database which is stored in a SQLite3 database.

Performance benchmark

Run pyinstrument <python-script.py>

For example, this is result for check_geoip2.py

  _     ._   __/__   _ _  _  _ _/_   Recorded: 20:23:02  Samples:  29
 /_//_/// /_\ / //_// / //_'/ //     Duration: 0.042     CPU time: 0.021
/   _/                      v4.0.3

Program: check_geoip2.py

0.041 <module>  <string>:1
   [4 frames hidden]  <string>, runpy
      0.041 _run_code  runpy.py:64
      └─ 0.041 <module>  check_geoip2.py:1
         ├─ 0.014 <module>  utils.py:1
         │  ├─ 0.012 <module>  geoip2/database.py:1
         │  │     [33 frames hidden]  geoip2, maxminddb, multiprocessing, s...
         │  ├─ 0.001 loads  <built-in>:0
         │  │     [2 frames hidden]  <built-in>
         │  └─ 0.001 <module>  ipaddress.py:4
         │        [7 frames hidden]  ipaddress, <built-in>
         ├─ 0.013 get_city  utils.py:10
         │  ├─ 0.009 city  geoip2/database.py:133
         │  │     [18 frames hidden]  geoip2, maxminddb
         │  └─ 0.004 __init__  geoip2/database.py:62
         │        [7 frames hidden]  geoip2, maxminddb, <built-in>
         ├─ 0.013 get_isp  utils.py:23
         │  ├─ 0.007 isp  geoip2/database.py:211
         │  │     [18 frames hidden]  geoip2, maxminddb
         │  └─ 0.006 __init__  geoip2/database.py:62
         │        [5 frames hidden]  geoip2, maxminddb, <built-in>
         └─ 0.001 BufferedReader.read  <built-in>:0
               [2 frames hidden]  <built-in>

ipdb's People

Contributors

ducminhgd avatar

Watchers

James Cloos avatar  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.