Skip to content

Commit

Permalink
Added test on randomly generated FIX messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim2266 committed Sep 24, 2015
1 parent fdd14c2 commit 2ba3365
Show file tree
Hide file tree
Showing 4 changed files with 449 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ debug : CFLAGS = -g -Wall -Wextra -Iinclude -DDEBUG
release32 : CFLAGS += -mx32

SRC = src/parser.c src/scanner.c src/utils.c src/converters.c \
test/main.c test/scanner_test.c test/parser_test.c test/test_utils.c test/utils_test.c test/$(SPEC).c
test/main.c test/scanner_test.c test/parser_test.c test/test_utils.c test/utils_test.c \
test/random_test.c test/$(SPEC).c

HEADERS = include/fix.h include/$(SPEC).h src/fix_impl.h test/test_utils.h

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ _OS:_ Linux Mint 17.2 64bit

FIX message type | FIX specification | Validation | Average time to parse one message
----------------------------------|------------------------------------------|------------|----------------------------------
NewOrderSingle('D') | Hand-coded spec. for this message only | No | 0.329 µs/msg
NewOrderSingle('D') | Hand-coded spec. for this message only | Yes | 0.539 µs/msg
NewOrderSingle('D') | Compiled full spec. for FIX.4.4 | Yes | 0.740 µs/msg
MarketDataIncrementalRefresh('X') | Hand-coded spec. for this message only | Yes | 1.274 µs/msg
MarketDataIncrementalRefresh('X') | Compiled full spec. for FIX.4.4 | Yes | 1.382 µs/msg
NewOrderSingle('D') | Hand-coded spec. for this message only | No | 0.326 µs/msg
NewOrderSingle('D') | Hand-coded spec. for this message only | Yes | 0.547 µs/msg
NewOrderSingle('D') | Compiled full spec. for FIX.4.4 | Yes | 0.739 µs/msg
MarketDataIncrementalRefresh('X') | Hand-coded spec. for this message only | Yes | 1.263 µs/msg
MarketDataIncrementalRefresh('X') | Compiled full spec. for FIX.4.4 | Yes | 1.443 µs/msg

For more details see `doc/` directory of the project.
4 changes: 3 additions & 1 deletion test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
void scanner_test();
void parser_test();
void utils_test();
void random_messages_test();

int main(int argv __attribute__((__unused__)), char** argc __attribute__((__unused__)))
int main()
{
scanner_test();
parser_test();
random_messages_test();
utils_test();

return 0;
Expand Down
Loading

0 comments on commit 2ba3365

Please sign in to comment.