shuttler/nessDB — Issue #16: Quick patch to build nessdb-bench on windows, I include result too.
Author: pitulloz
Created: 2011-11-14 03:29:11+00:00
State: open

patch for src/db.c

```
41c41,43
< #include
---
> #ifdef _WIN32
> #include
> #endif
77a80,82
>	#ifdef _WIN32
>	_mkdir(DB_DIR);
>	#else
78a84
>	#endif
```

add src/build.bat

@echo off
gcc -std=c99 -pedantic -Wall -Wextra -Os -c db.c
gcc -std=c99 -pedantic -Wall -Wextra -Os -c ht.c
gcc -std=c99 -pedantic -Wall -Wextra -Os -c level.c
gcc -std=c99 -pedantic -Wall -Wextra -Os -c llru.c
gcc -std=c99 -pedantic -Wall -Wextra -Os -c storage.c
ar -rcs -o libnessdb.a db.o ht.o level.o llru.o storage.o
gcc -std=c99 -pedantic -Wall -Wextra -Os -c nessdb-bench.c
gcc -s -o nessdb-bench nessdb-bench.o libnessdb.a -lws2_32
nessdb-bench add

rem test on Compaq Presario CQ42, CPU: Intel core i3 M 350 @ 2.27GHz, OS: Windows 7 64-bit
rem random write performance increase from 6.3 MB/sec (version 1.7) to 6.5 MB/sec

rem D:\local\nessDB-1.8\src>nessdb-bench add
rem Keys: 16 bytes each
rem Values: 80 bytes each
rem Entries: 2000000
rem IndexSize: 45.8 MB (estimated)
rem DataSize: 160.2 MB (estimated)
rem --------------------------------------------------------------------------------------------------------------
rem nessDB: version 1.8(Multiple && Distributable B+Tree with Level-LRU,Page-Cache)
rem Date: Mon Nov 14 10:00:32 2011
rem +-----------------------+---------------------------+----------------------------------+---------------------+
rem |Random-Write (done:1999999): 0.000016 sec/op; 62971.3 writes/sec(estimated); 6.5 MB/sec; cost:31.760(sec)
rem +-----------------------+---------------------------+----------------------------------+---------------------+
rem |Random-Read (found:20000): 0.000009 sec/op; 106837.0 reads /sec(estimated); 11.0 MB/sec; cost:0.187(sec)
rem +-----------------------+---------------------------+----------------------------------+---------------------+
rem |Seq-Read (found:20000): 0.000009 sec/op; 106837.6 reads /sec(estimated); 11.0 MB/sec; cost:0.187(sec)
rem +-----------------------+---------------------------+----------------------------------+---------------------+