Code Monkey home page Code Monkey logo

cxnet's People

Contributors

superbobry avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

superbobry

cxnet's Issues

pypy testing

Some results of pypy (+JIT) testing.

statfs with pypy-c (PyPy 1.6.0-dev1 with GCC 4.5.2)

# time ls -l /srv/statfs/ >/dev/null
real    0m1.236s
user    0m0.000s
sys     0m0.020s

statfs with Python (Python 2.7.1+)

# time ls -l /srv/statfs/ >/dev/null 
real    0m0.742s
user    0m0.000s
sys     0m0.020s

It seems that here PyPy runs slower than plain Python… We need to test if there is a reason to run the code under PyPy at all.

support IPv6-enabled systems

having ipv6-addresses enabled causes e.g. get_route to break:

In [4]: iproute2.get_route("8.8.8.8")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

<ipython console> in <module>()

cxnet/cxnet/netlink/iproute2.py in get_route(self, addr, table)
    330         for i in ret:
    331             if ('dst_prefix' in i.keys()) and ('dst_len' in i.keys()):
--> 332                 if dqn_to_int(i['dst_prefix']) == get_base(dst,i['dst_len']):
    333                     result['static'] = i
    334             elif ('dst_len' in i.keys()) and ('src_len' in i.keys()):

cxnet/cxnet/utils.py in dqn_to_int(st)
    209     # not extensible at all, but that works faster

    210     ###

--> 211     return int("%02x%02x%02x%02x" % (int(st[0]),int(st[1]),int(st[2]),int(st[3])),16)
    212 
    213 def int_to_dqn(st):

ValueError: invalid literal for int() with base 10: '201:foo:bar:02:00:00:00:01'

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.