Skip to content

Commit

Permalink
add unit test for lru cache
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Oct 31, 2014
1 parent 2461f62 commit 3fc543c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ cache:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential libssl-dev swig python-m2crypto python-numpy dnsutils
- pip install m2crypto salsa20 pep8
- pip install m2crypto salsa20 pep8 nose
- sudo tests/socksify/install.sh
script:
- pep8 .
- nosetests shadowsocks/*
- python tests/test.py -c tests/table.json
- python tests/test.py -c tests/aes.json
- python tests/test.py -c tests/aes-ctr.json
Expand Down
11 changes: 6 additions & 5 deletions tests/test_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import time


before = time.time()
if __name__ == '__main__':
before = time.time()

for line in sys.stdin:
if 'HTTP/1.1 ' in line:
diff = time.time() - before
print 'headline %dms' % (diff * 1000)
for line in sys.stdin:
if 'HTTP/1.1 ' in line:
diff = time.time() - before
print 'headline %dms' % (diff * 1000)

0 comments on commit 3fc543c

Please sign in to comment.