Permalink
Browse files

0.3.3 release - ease of build, sample compatibility, fixes, benchmark…

… post
  • Loading branch information...
H. Diedrich
H. Diedrich committed Feb 11, 2013
1 parent 8d646da commit 5f182980386ff90dfde88a273a49712cb4018434
View
176 Makefile
@@ -1,20 +1,20 @@
###-------------------------------------------------------------------------###
### File : Makefile ###
-### Version : 0.3.0/beta ###
+### Version : 0.3/beta ###
### Description : Erlang VoltDB driver main build and run rules ###
### Copyright : VoltDB, LLC - http://www.voltdb.com ###
### Production : Eonblast Corporation - http://www.eonblast.com ###
### Author : H. Diedrich <hd2012@eonblast.com> ###
### License : MIT ###
### Created : 17 Apr 2010 ###
-### Changed : 02 Feb 2013 ###
+### Changed : 06 Feb 2013 ###
###-------------------------------------------------------------------------###
### ###
### This driver is being contributed to VoltDB by Eonblast Corporation. ###
### ###
###-------------------------------------------------------------------------###
### ###
-### Erlvolt 0.3.0/alpha - Erlang VoltDB client API. ###
+### Erlvolt 0.3/beta - Erlang VoltDB client API. ###
### ###
### This file is part of VoltDB. ###
### Copyright (C) 2008-2013 VoltDB, LLC http://www.voltdb.com ###
@@ -77,44 +77,45 @@
###-------------------------------------------------------------------------###
LIBDIR=$(shell erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell)
-VERSION=0.3.1
+VERSION=0.3.3
PKGNAME=erlvolt
APP_NAME=erlvolt
MODULES=$(shell ls -1 src/*.erl | awk -F[/.] '{ print $$2 }' | sed '$$q;s/$$/,/g')
MAKETIME=$(shell date)
+LESSVERB=--no-print-directory
#
# Main Build, Hello, Bench
#
# Build the driver, with debug info compiled in
all: app
- @(cd src; $(MAKE) DEBUG=true)
- @(cd etc/bench; $(MAKE) DEBUG=true)
+ @(cd src; $(MAKE) $(LESSVERB) DEBUG=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) DEBUG=true)
# Hello 'redirects' to a robuster hello world
hello: hello-plus
# This executed examples/hello_plus.erl.
# Simplest source see examples/hello.erl,
- # 'make hello-barebones' executes it.
+ # 'make hello-barebones' executes that.
#
# Driver compilation variants
#
fast: app
- @(cd src;$(MAKE) NATIVE=true)
- @(cd etc/bench; $(MAKE) NATIVE=true)
+ @(cd src;$(MAKE) $(LESSVERB) NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) NATIVE=true)
profile: app
- @(cd src;$(MAKE) PROFILE=true NATIVE=true)
- @(cd etc/bench; $(MAKE) PROFILE=true NATIVE=true)
+ @(cd src;$(MAKE) $(LESSVERB) PROFILE=true NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) PROFILE=true NATIVE=true)
profile-debug: app
- @(cd src;$(MAKE) PROFILE=true DEBUG=true)
- @(cd etc/bench;$(MAKE) PROFILE=true DEBUG=true)
+ @(cd src;$(MAKE) $(LESSVERB) PROFILE=true DEBUG=true)
+ @(cd etc/bench;$(MAKE) $(LESSVERB) PROFILE=true DEBUG=true)
app: ebin/$(PKGNAME).app
@@ -128,25 +129,37 @@ ebin/$(PKGNAME).app: src/$(PKGNAME).app.src
# A slightly more robust hello world: hello_plus.erl
hello-plus: all
- @(cd examples; $(MAKE) hello-plus DEBUG=true)
+ @(cd examples; $(MAKE) $(LESSVERB) hello-plus DEBUG=true)
erl -pa ./ebin -s hello_plus run -s init stop -noshell
# A simpler hello.erl
hello-barebones: all
- @(cd examples; $(MAKE) hello DEBUG=true)
+ @(cd examples; $(MAKE) $(LESSVERB) hello DEBUG=true)
erl -pa ./ebin -s hello run -s init stop -noshell
+# A simpler hello.erl
+hello-barebones-pre3: all
+ @(cd examples; $(MAKE) $(LESSVERB) hello-barebones-pre3 DEBUG=true)
+ erl -pa ./ebin -s hello_pre3 run -s init stop -noshell
+
# A more Erlang hello world with many processes.
parallel: all
- @(cd examples; $(MAKE) parallel DEBUG=true)
+ @(cd examples; $(MAKE) $(LESSVERB) parallel DEBUG=true)
erl -pa ./ebin -s parallel run -s init stop -noshell
+# A more Erlang hello world with many processes, for VoltDB pre 3.0.
+# The only difference is a switch in the column order in the hello sample.
+parallel-pre3: all
+ @(cd examples; $(MAKE) $(LESSVERB) parallel-pre3 DEBUG=true)
+ erl -pa ./ebin -s parallel_pre3 run -s init stop -noshell
+
+
#
# Voter sample
#
voter: all
- @(cd examples; $(MAKE) voter DEBUG=true)
+ @(cd examples; $(MAKE) $(LESSVERB) voter DEBUG=true)
erl -pa ./ebin -s voter run -s init stop -noshell
#
@@ -161,23 +174,23 @@ benches: bench-vsm bench-vsd bench-vbm bench-vbd
### Voter steady managed (reference 13,000 T/sec/core)
bench-vsm:
- @(cd etc/bench; $(MAKE) bench-vsm NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-vsm NATIVE=true)
### Voter steady direct (reference 21,000 T/sec/core)
bench-vsd:
- @(cd etc/bench; $(MAKE) bench-vsd NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-vsd NATIVE=true)
### Voter bursts managed (reference 10,000 T/sec/core)
bench-vbm:
- @(cd etc/bench; $(MAKE) bench-vbm NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-vbm NATIVE=true)
### Voter bursts direct (reference 16,000 T/sec/core)
bench-vbd:
- @(cd etc/bench; $(MAKE) bench-vbd NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-vbd NATIVE=true)
### Hello steady direct (reference 21,000 T/sec/core)
bench-hsd:
- @(cd etc/bench; $(MAKE) bench-hsd NATIVE=true)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-hsd NATIVE=true)
### Multi-VM benchmark (VSD)
# optional parameters (default):
@@ -187,21 +200,38 @@ bench-hsd:
# SPAWN (100) # of parallel ('steady') workers = max server load
# use e.g. make bench-mvm CALLS=1000000
bench-mvm:
- @(cd etc/bench; $(MAKE) bench-mvm)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-mvm)
bench-help:
- @(cd etc/bench; $(MAKE) bench-help)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) bench-help)
#
# Doc Creation
#
+# Create doc HTML from source comments
+# IF THIS FAILS, IT'S THE -E
+docs: clean-docs
+ @echo make docs
+ sed -E -f etc/markedoc.sed README.md > doc/readme.edoc
+ sed -E -f etc/markedoc.sed CHANGES.md > doc/changes.edoc
+ erl -noshell -run edoc_run application "'erlvolt'" '"."' '[{def,{vsn,""}},{stylesheet, "erlvolt-style.css"}]'
+ LANG=C sed -E -i "" -e "s/<table width=\"100%\" border=\"1\"/<table width=\"100%\" class=index border=\"0\"/" doc/*.html
+
+# Pushes created docs into dir ../Erlvolt-github-pages to push to github pages.
+# Make sure to do 'make docs' first.
+# will fail if you haven't checked out github pages into ../Erlvolt-github-pages
+pages:
+ (cd ../Erlvolt-github-pages; git pull origin gh-pages)
+ cp -r doc/* ../Erlvolt-github-pages
+ (cd ../Erlvolt-github-pages; git add .; git commit -m 'make pages'; git push origin gh-pages)
+
# Create HTML from Markdown to test README.md appearance
html:
+ @echo make html
lua etc/markdown.lua README.md
lua etc/markdown.lua doc/CHANGES.md
lua etc/markdown.lua doc/BENCHMARK1.md
- lua etc/markdown.lua doc/BENCHMARK2.md
lua etc/markdown.lua etc/bench/README.md && cp etc/bench/README.html doc/BENCHMARK-README.html
#
# Building and Deployment
@@ -210,65 +240,121 @@ html:
# clean and doc creation for release, any branch
release: clean html
-# clean for master branch
-master: release
- etc/replace %-%.* ""
- etc/replace TODO.*$ ""
- rm -f doc/edoc-info
- rm -f doc/erlang.png
- rm -f doc/erlvolt-footer.png
- rm -f doc/erlvolt-style.css
- rm -f doc/stylesheet.css
-
clean:
+ @echo clean
@# these can all appear
- @(cd src; $(MAKE) clean)
- @(cd examples; $(MAKE) clean)
- @(cd etc/bench; $(MAKE) clean)
+ @(cd src; $(MAKE) $(LESSVERB) clean)
+ @(cd examples; $(MAKE) $(LESSVERB) clean)
+ @(cd etc/bench; $(MAKE) $(LESSVERB) clean)
+ @rm -f ct_run*
+ @rm -f .DS_Store
+ @rm -rf */.DS_Store
+ @rm -rf */*.DS_Store
@rm -rf ebin/*.app
@rm -rf ebin/*.beam
@rm -rf ebin/*.dump
@rm -rf ebin/cover
@rm -f *.beam
@rm -f *.dump
- @rm -f *.html
@rm -f *.log
@rm -f *.totals
- @rm -rf ct_run*
@rm -f variables-ct*
@rm -rf etc/test/ct_run*
@rm -f etc/test/variables-ct*
@rm -f etc/test/*.beam
@rm -f etc/test/*.html
@rm -f etc/test/ct_default.css
@rm -f etc/test/jquery*.js
+ @rm -f doc/.!*.html
@rm -rf $(PKGNAME)-$(VERSION)
@rm -f $(PKGNAME)-$(VERSION).tgz
- # clean
clean-docs:
+ @echo clean docs
@rm -f doc/readme.edoc
@rm -f doc/changes.edoc
@rm -f doc/overview.edoc
@rm -f doc/*.html
+ @rm -f doc/.!*.html
@rm -f doc/README.html
@rm -f doc/CHANGES.html
@rm -f doc/BENCHMARKS.html
@rm -f doc/BENCHMARK1.html
- @rm -f doc/BENCHMARK2.html
@rm -f doc/BENCHMARK-README.html
package: clean
- @mkdir $(PKGNAME)-$(VERSION)/ && cp -rf ebin include Makefile README.md src etc examples $(PKGNAME)-$(VERSION)
+ @mkdir $(PKGNAME)-$(VERSION)/ && cp -rf ebin include Makefile README.md README.html src doc etc examples $(PKGNAME)-$(VERSION)
@COPYFILE_DISABLE=true tar zcf $(PKGNAME)-$(VERSION).tgz $(PKGNAME)-$(VERSION)
@rm -rf $(PKGNAME)-$(VERSION)/
-
#
-# Tests
+# Unit Tests
#
test: all
(cd etc/test; ct_run -suite environment_SUITE basics_SUITE -pa ../../ebin)
+#
+# Dialyzer Tests
+#
+
+include etc/test/dialyzer.mk
+
+
+#
+# Make Help
+#
+help:
+ # building
+ # --------
+ # all: Build all, with debug info, w/o profiler
+ # fast: Build native HiPE beams, 20% faster
+ # profile: Build native and with profiler, which is slower
+ # profile-debug: Build with profiler and debug info
+ # clean: Clean all built files
+ #
+ # examples
+ # --------
+ # hello: Build hello world example, needs running hello world database
+ # hello-plus: A slightly more robust hello world: hello_plus.erl
+ # hello-barebones: A simpler hello.erl
+ # hello-barebones-pre3: A simpler hello.erl
+ # parallel: A more Erlang hello world with many processes.
+ # parallel-pre3: A more Erlang hello world with many processes, for VoltDB pre 3.0.
+ # voter: Build voter example, needs running voter database
+ #
+ # benchmarks
+ # ----------
+ # bench-help: More details on the following bench rules
+ # bench: Alias for bench-vsd
+ # benches: Bench-vsm bench-vsd bench-vbm bench-vbd
+ # bench-vsm: Voter steady managed (reference 13,000 T/sec/core)
+ # bench-vsd: Voter steady direct (reference 21,000 T/sec/core)
+ # bench-vbm: Voter bursts managed (reference 10,000 T/sec/core)
+ # bench-vbd: Voter bursts direct (reference 16,000 T/sec/core)
+ # bench-hsd: Hello steady direct (reference 21,000 T/sec/core)
+ # bench-mvm: Multi-VM benchmark (VSD)
+ # Optional parameters (default):
+ # VMS (5) # of virtual machines (erl Erlang emulators) started
+ # CORES (1) # number of cores used per VM (erl parameter +S)
+ # CALLS (100000) # of transactions per VM for the benchmark
+ # SPAWN (100) # of parallel ('steady') workers = max server load
+ # Use e.g. make bench-mvm CALLS=1000000
+ #
+ # documentation building
+ # ----------------------
+ # docs: Create doc HTML from source comments
+ # html: Create HTML from Markdown to test README.md appearance
+ # clean-docs: Clean the files built by make docs and make html
+ #
+ # release building
+ # ----------------
+ # release: Clean and doc creation for release, any branch
+ # package: make zipped tarball
+ #
+ # source tests
+ # ------------
+ # test: run Common Tests (unit tests)
+ # dialyzer: run dialyzer source tests
+ @echo
View
@@ -2,20 +2,23 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title>voltdb-client-erlang Erlvolt 0.3.1/beta</title>
+ <title>voltdb-client-erlang Erlvolt 0.3.3/beta</title>
<link rel="stylesheet" type="text/css" href="default.css" />
</head>
<body>
-<h1>voltdb-client-erlang Erlvolt 0.3.1/beta</h1>
+<h1>voltdb-client-erlang Erlvolt 0.3.3/beta</h1>
-<p><strong>Release: 'Erlvolt 0.3.1/beta'</strong> <br/>
+<p><strong>Release: 'Erlvolt 0.3.3/beta'</strong> <br/>
<strong>Author: H. Diedrich</strong> <br/>
<strong>Production: Eonblast Corporation</strong> <br/>
<strong>Copyright: (c) 2013 VoltDB, Inc</strong> <br/>
<strong>Licence: MIT</strong> <br/>
<strong>Date: 4 Feb 2013</strong> </p>
+<p><strong>VoltDB: 2.8, 3.0</strong>
+<strong>Erlang: R15B03, R16 RC</strong></p>
+
<p>This is an <a href="http://www.erlang.org">Erlang</a> <a href="hhtp://www.voltdb.com">VoltDB</a> driver provided by <a href="http://www.eonblast.com">Eonblast</a>. It is <a href="#Samples">easy</a> to use but provides strong <a href="#Adding_a_Pool">connection pooling</a> and a broad array of <a href="#Options">options</a>. It is optimized for a central node architecture and super high velocity OLTP.</p>
<p>While databases generally can be accessed via ODBC in Erlang, you should see better performance when using a <em>driver</em> like Erlvolt. For <a href="#Samples">samples</a>, <a href="#Usage">API description</a> and fine tuning <a href="#Options">options</a> see below. </p>
@@ -140,7 +143,7 @@ <h3>Hello World</h3>
<pre><code>-module(hello).
-export([run/0]).
--import(erlvolt).
+
-include("erlvolt.hrl").
run() -&gt;
View
@@ -1,13 +1,16 @@
-voltdb-client-erlang Erlvolt 0.3.1/beta
+voltdb-client-erlang Erlvolt 0.3.3/beta
=======================================
-**Release: 'Erlvolt 0.3.1/beta'**
+**Release: 'Erlvolt 0.3.3/beta'**
**Author: H. Diedrich**
**Production: Eonblast Corporation**
**Copyright: (c) 2013 VoltDB, Inc**
**Licence: MIT**
**Date: 4 Feb 2013**
+**VoltDB: 2.8, 3.0**
+**Erlang: R15B03, R16 RC**
+
This is an [Erlang](http://www.erlang.org) [VoltDB](hhtp://www.voltdb.com) driver provided by [Eonblast](http://www.eonblast.com). It is [easy][Samples] to use but provides strong [connection pooling][Adding_a_Pool] and a broad array of [options][options]. It is optimized for a central node architecture and super high velocity OLTP.
While databases generally can be accessed via ODBC in Erlang, you should see better performance when using a *driver* like Erlvolt. For [samples][Samples], [API description][Usage] and fine tuning [options][Options] see below.
@@ -123,7 +126,7 @@ This is a hello world program. Follow the steps below to try it out.
-module(hello).
-export([run/0]).
- -import(erlvolt).
+
-include("erlvolt.hrl").
run() ->
Oops, something went wrong.

0 comments on commit 5f18298

Please sign in to comment.