File: demo-ipp.py

package info (click to toggle)
python-libtrace 1.6-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 2,160 kB
  • sloc: ansic: 6,886; python: 3,187; sh: 79; makefile: 70
file content (11 lines) | stat: -rw-r--r-- 278 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
import ipp, resource

#a = bytearray(b"Hell")
a = bytearray([130, 216, 38, 7])
p = ipp.IPprefix(4, a, 32)
print "p = %s, type = %s" % (str(p), type(p))

for n in range(0,100000):
    if (n % 10000):
        print "using %d" % resource.getrusage(resource.RUSAGE_SELF).ru_maxrss