[Bro-Dev] Broker raw throughput

Matthias Vallentin vallentin at icir.org
Thu Feb 25 08:19:47 PST 2016


For better reproducibility, here's the Makefile that I used to drive the
experiments:

    CC = cc
    CXX = c++
    FLAGS = -O3 -g -std=c++11 -stdlib=libc++
    LIBS = -lcaf_core -lcaf_io -ltcmalloc -lprofiler

    caf-client: caf-client.cpp
        $(CXX) $(FLAGS) $< -o $@ $(LIBS)

    caf-server: caf-server.cpp
        $(CXX) $(FLAGS) $< -o $@ $(LIBS)

    bench-caf-client:
        CPUPROFILE=caf-client.prof ./caf-client 1000

    bench-caf-server:
        CPUPROFILE=caf-server.prof ./caf-server 10

    bench-caf-pprof: caf-client.prof caf-server.prof 
        pprof --pdf caf-client caf-client.prof > caf-client.pdf
        pprof --pdf caf-server caf-server.prof > caf-server.pdf

On my FreeBSD box, I had to add /usr/local/include to -I and -L, because
I installed CAF and gperftools via ports. Since it's a headless machine
without ps2pdf, we need extra level of indirection:

    (1) pprof --raw caf-client caf-client.prof > caf-client.raw
    (2) copy raw profile to desktop
    (3) pprof --pdf caf-client.raw > caf-client.pdf

Hope this helps,

    Matthias


More information about the bro-dev mailing list