Performance Testing for C++ has been created by Carl Trieloff (Apr 14, 2008).

Content:

How to measure performance of my hardware

(page in progress)

Overview...

Basic tuning

... examples...

Some sample results running on the old lump in the corner, running on current hardware you should easily beat these.


Unknown macro: {frame}

... data ...

The following tool is including, or can be located in 'cpp/src/tests/' Run with --help to check the options on the latest version.

$ ./perftest --help

N4qpid7Options9ExceptionE: Test Options:
  -h [ --host ] HOST (localhost)       Broker host to connect to
  -b [ --broker ] HOST (localhost)     Broker host to connect to
  -p [ --port ] PORT (5672)            Broker port to connect to
  -v [ --virtualhost ] VHOST           virtual host
  -n [ --clientname ] ID (cpp)         unique client identifier
  --username USER (guest)              user name for broker log in.
  --password USER (guest)              password for broker log in.
  --help                               print this usage statement
  --setup                              Create shared queues.
  --control                            Run test, print report.
  --publish                            Publish messages.
  --subscribe                          Subscribe for messages.
  --mode shared|fanout|topic (shared)  Test mode.
                                       shared: --qt queues, --npubs publishers 
                                       and --nsubs subscribers per queue.
                                       
                                       fanout: --npubs publishers, --nsubs subs
                                       cribers, fanout exchange.
                                       topic: --qt topics, --npubs publishers a
                                       nd --nsubs subscribers per topic.
                                       
  --npubs N (1)                        Create N publishers.
  --count N (500000)                   Each publisher sends N messages.
  --size BYTES (1024)                  Size of messages in bytes.
  --pub-confirm yes|no (1)             Publisher use confirm-mode.
  --durable yes|no (0)                 Publish messages as durable.
  --unique-data yes|no (0)             Make data for each message unique.
  --nsubs N (1)                        Create N subscribers.
  --sub-ack N (0)                      N>0: Subscriber acks batches of N.
                                       N==0: Subscriber uses unconfirmed mode
  --qt N (1)                           Create N queues or topics.
  --iterations N (1)                   Desired number of iterations of the test
                                       .
  -s [ --summary ]                     Summary output: pubs/sec subs/sec transf
                                       ers/sec Mbytes/sec
  --queue_max_count N (0)              queue policy: count to trigger 'flow to 
                                       disk'
  --queue_max_size N (0)               queue policy: accumulated size to trigge
                                       r 'flow to disk'
  --interval_sub ms (0)                >=0 delay between msg consume
  --interval_pub ms (0)                >=0 delay between msg publish

Logging options:
  --log-output FILE (stderr)  Send log output to FILE. FILE can be a file name 
                              or one of the special values:
                              stderr, stdout, syslog
  -t [ --trace ]              Enables all logging
  --log-enable RULE (error+)  Enables logging for selected levels and component
                              s. RULE is in the form 'LEVEL[+][:PATTERN]' 
                              Levels are one of: 
                               trace debug info notice warning error critical
                              For example:
                              '--log-enable warning+' logs all warning, error 
                              and critical messages.
                              '--log-enable debug:framing' logs debug messages 
                              from the framing namespace. This option can be 
                              used multiple times
  --log-time yes|no (1)       Include time in log messages
  --log-level yes|no (1)      Include severity level in log messages
  --log-source yes|no (0)     Include source file:line in log messages
  --log-thread yes|no (0)     Include thread ID in log messages
  --log-function yes|no (0)   Include function signature in log messages


There are two ways to use perftest: single process or multi-process.

If none of the --setup, --publish, --subscribe or --control options
are given perftest will run a single-process test.
For a  multi-process test first run:
  perftest --setup <other options>
and wait for it to complete. The remaining process should run concurrently::
Run --npubs times: perftest --publish <other options>
Run --nsubs times: perftest --subscribe <other options>
Run once:          perftest --control <other options>
Note the <other options> must be identical for all processes.

Reply via email to