git.iko.soy/distributed-process
on ff8d9c6 help sign in
69 lines 1.7 kB history raw
2# Run 100K ping-pongs, for one trial:
3size = 100000
4trials = 1
5# You can run "make run1 size=1000 trials=100" for example.
8# Disable this to test installed packages only:
9INCLUDES= -i../network-transport/src -i../network-transport-pipes/src
11ifeq ($(GHC),)
12 GHC=ghc
13endif
15BENCHS= PingTCP.exe PingTCPTransport.exe PingPipes.exe SendTransport.exe
17all: $(BENCHS)
18$(BENCHS): %.exe: %.hs
19 $(GHC) -O2 -rtsopts -threaded --make $(INCLUDES) $< -o $@
21#-------------------------------------------------------------------------------
22# Shorthands for running benchmarks:
24run: run1 run2 run3 run4
26run1: runBaseline
27runBaseline:
28 ./PingTCP.exe server 8080 &
29 sleep 1
30 time ./PingTCP.exe client 0.0.0.0 8080 $(size) $(trials)
31 # Kill the server:
32 killall PingTCP.exe
34run2: runTCP
35runTCP:
36 ./PingTCPTransport.exe server 0.0.0.0 8080 sourceAddr &
37 sleep 1
38 # Run 100K ping-pongs, for one trial:
39 time ./PingTCPTransport.exe client 0.0.0.0 8081 sourceAddr $(size) $(trials)
40 # Kill the server:
41 killall PingTCPTransport.exe
43run3: runPipes
44runPipes:
45 ./PingPipes.exe server sourceAddr &
46 sleep 1
47 time ./PingPipes.exe client sourceAddr $(size) $(trials)
48 # Kill the server:
49 killall PingPipes.exe
51# This benchmark measures throughput rather than latency
52# Here 'size' means message size rather than number of pings:
53run4: runTPT
54runTPT:
55 ./SendTransport.exe server 0.0.0.0 8080 sourceAddr &
56 sleep 1
57 ./SendTransport.exe client 0.0.0.0 8081 sourceAddr $(size)
58 killall SendTransport.exe
60# Run multiple sizes:
61runTPTs:
62 $(MAKE) runTPT size=1000
63 $(MAKE) runTPT size=5000
64 $(MAKE) runTPT size=10000
65 $(MAKE) runTPT size=50000
66 $(MAKE) runTPT size=100000
68clean:
69 rm -f *.hi *.o *.exe