Merge pull request #88 from jollyroger/debian-patches

Debian patches.
master
Nicolas Favre-Felix 11 years ago
commit 867cda7b56

@ -1,11 +1,12 @@
OUT=webdis
HIREDIS_OBJ=hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o
JANSSON_OBJ=jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o
FORMAT_OBJS=formats/json.o formats/raw.o formats/common.o formats/custom-type.o
HTTP_PARSER_OBJS=http-parser/http_parser.o
HIREDIS_OBJ?=hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o
JANSSON_OBJ?=jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o
B64_OBJS?=b64/cencode.o
FORMAT_OBJS?=formats/json.o formats/raw.o formats/common.o formats/custom-type.o
HTTP_PARSER_OBJS?=http-parser/http_parser.o
CFLAGS=-O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
LDFLAGS=-levent -pthread
CFLAGS ?= -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser
LDFLAGS ?= -levent -pthread
# check for MessagePack
MSGPACK_LIB=$(shell ls /usr/lib/libmsgpack.so 2>/dev/null)
@ -16,8 +17,8 @@ ifneq ($(strip $(MSGPACK_LIB)),)
endif
DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS)
OBJS=webdis.o cmd.o worker.o slog.o server.o libb64/cencode.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o $(DEPS)
DEPS=$(FORMAT_OBJS) $(HIREDIS_OBJ) $(JANSSON_OBJ) $(HTTP_PARSER_OBJS) $(B64_OBJS)
OBJS=webdis.o cmd.o worker.o slog.o server.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o $(DEPS)
@ -49,3 +50,17 @@ clean:
install: $(OUT) $(INSTALL_DIRS)
cp $(OUT) $(DESTDIR)/$(PREFIX)/bin
cp webdis.prod.json $(CONFDIR)
WEBDIS_PORT ?= 7379
test_all: test perftest
test:
python tests/basic.py
python tests/limits.py
./tests/pubsub -p $(WEBDIS_PORT)
perftest:
# This is a performance test that requires apache2-utils and curl
./tests/bench.sh

@ -9,7 +9,7 @@
#include <jansson.h>
#include <evhttp.h>
#include <libb64/cencode.h>
#include <b64/cencode.h>
#include "conf.h"
#include "acl.h"

@ -1,4 +1,3 @@
/* A slog is a simple log. Basically extracted from antirez/redis. */
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

@ -6,9 +6,9 @@ try:
except:
msgpack = None
host = '127.0.0.1'
port = 7379
import os
host = os.getenv('WEBDIS_HOST', '127.0.0.1')
port = int(os.getenv('WEBDIS_PORT', 7379))
class TestWebdis(unittest.TestCase):

@ -1,8 +1,12 @@
#!/bin/bash
CLIENTS=100
REQUESTS=100000
HOST=127.0.0.1
PORT=7379
HOST=$WEBDIS_HOST
PORT=$WEBDIS_PORT
[ -n $HOST ] && HOST=127.0.0.1
[ -n $PORT ] && PORT=7379
info() {
echo "Testing on $HOST:$PORT with $CLIENTS clients in parallel, for a total of $REQUESTS requests per benchmark."

@ -2,8 +2,9 @@
import socket
import unittest
HOST = "127.0.0.1"
PORT = 7379
import os
HOST = os.getenv('WEBDIS_HOST', '127.0.0.1')
PORT = int(os.getenv('WEBDIS_PORT', 7379))
class BlockingSocket:

@ -1,5 +1,5 @@
#include "sha1/sha1.h"
#include "libb64/cencode.h"
#include <b64/cencode.h>
#include "websocket.h"
#include "client.h"
#include "cmd.h"

Loading…
Cancel
Save