This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------------------------- | |
// ab.c is a wrapper for Apache Benchmark, HTTPerf and Weighttp (from Lighttpd) | |
// ---------------------------------------------------------------------------- | |
// For max speed, build and run ab.c: gcc ab.c -O2 -o abc -lpthread (and ./abc) | |
// You can also edit & play this program in one step this way: ./gwan -r ab.c | |
// ============================================================================ | |
// Benchmark framework to test the (free) G-WAN Web App. Server http://gwan.ch/ | |
// See the How-To here: http://gwan.com/en_apachebench_httperf.html | |
// ---------------------------------------------------------------------------- | |
// 1) invoke Apache Benchmark (IBM), Weighttp (Lighttpd) or HTTPerf (HP) on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================================ | |
// Java servlet example for the G-WAN Web App. Server (http://trustleap.ch/) | |
// ---------------------------------------------------------------------------- | |
// loan.java: G-WAN's version of the Java loan http://gwan.ch/source/loan.jsp | |
// written for GlassFish (follow the link above for details). | |
// ---------------------------------------------------------------------------- | |
// This Java code is served very quickly by G-WAN (despite C/Java conversions). | |
// See below (the " -t 6" option setups 6 client worker threads for 6 Cores): | |
// | |
// weighttp -n 1000000 -c 300 -t 6 -k -H "Accept-Encoding: gzip" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================================================ | |
// C servlet sample for the G-WAN Web Application Server (http://trustleap.ch/) | |
// ---------------------------------------------------------------------------- | |
// json_bench.c: just parsing json | |
// | |
// output: | |
// On 1 single CPU Core, parsing this JSON tree 100,000 times took 624 ms | |
// ============================================================================ | |
#include "gwan.h" // G-WAN exported functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --------------------------------------------------------------------------- | |
// This test is in relation with the "Bigtable" tests done in Haskell: | |
// | |
// http://jaspervdj.be/blaze/benchmarks.html | |
// | |
// Here is a comparison of Haskell a "high-performance implementation of | |
// concurrency and parallelism" (according to Wikipedia) to plain old C: | |
// | |
// http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=ghc&lang2=gcc | |
// |