Merge branch 'master' into travis

travis
Raphaël Vinot 2016-01-19 14:48:36 +01:00
commit f0d9e5d29f
5 changed files with 43 additions and 5 deletions

6
.gitmodules vendored
View File

@ -1,3 +1,9 @@
[submodule "uwhoisd"]
path = uwhoisd
url = https://github.com/Rafiot/uwhoisd.git
[submodule "faup"]
path = faup
url = https://github.com/stricaud/faup.git
[submodule "redis"]
path = redis
url = https://github.com/antirez/redis.git

View File

@ -4,6 +4,7 @@ python:
- "2.7"
sudo: required
dist: trusty
addons:
apt:
@ -11,7 +12,7 @@ addons:
- parallel
install:
- git clone git://github.com/stricaud/faup.git
# Faup
- pushd faup/build
- cmake .. && make
- sudo make install
@ -20,21 +21,33 @@ install:
- pushd faup/src/lib/bindings/python
- python setup.py install
- popd
- pip install -r requirements.txt
# redis
- pushd redis
- make
- popd
# Run uwhoisd
- pushd uwhoisd
- python setup.py install
- ../redis/src/redis-server extra/redis.conf --daemonize yes
- sleep 10
- uwhoisd extra/uwhoisd.ini &
- popd
# Other Python deps
- pip install -r requirements.txt
- pip install coveralls
- pip install codecov
- cp config.ini.sample config.ini
before_script:
- redis-server /etc/redis/redis.conf --port 6334 --daemonize yes
- cp config.ini.sample config.ini
- redis/src/redis-server --port 6334 --daemonize yes
- sleep 10
script:
- ./worker.py &
- ./runapp.py &
- sleep 30
- sleep 5
- curl http://0.0.0.0:5100/
- sleep 20
after_success:
- coveralls

1
faup Submodule

@ -0,0 +1 @@
Subproject commit 9a1440d23290670b4c67d4b15cee19f534adadc7

1
redis Submodule

@ -0,0 +1 @@
Subproject commit 83b862a30ee90ee5f85eefcc63ff5241b501f073

17
stats_generator.py Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python
from datetime import date, timedelta
import redis
def perdelta(start, end, delta):
curr = start
while curr < end:
yield curr
curr += delta
r = redis.Redis('localhost', 6334, db=1)
for result in perdelta(date(2015, 03, 01), date(2015, 12, 12), timedelta(days=1)):
val = r.zcard('{}_submissions'.format(result))
print('{},{}'.format(result, val))