PerfCake 7.x

User Guide

Pavel Macík

Martin Večeřa


Table of Contents

Acknowledgements
1. Introduction
1.1. Obtaining and installing PerfCake
1.1.1. Downloading distribution
1.1.2. Building distribution
1.1.3. Minimal requirements
1.1.4. Installing PerfCake
1.1.5. Running PerfCake
1.2. Your first performance test
1.2.1. First out-of-the box demo with httpbin.org
1.2.2. Your own quickstart
Preparing PerfCake
Configure and run
Evaluate results
2. PerfCake Features
2.1. PerfCake Architecture Overview
2.2. Performance scenario definition
2.2.1. XML scenario
Scenario structure
Sections of the scenario
2.2.2. DSL scenario
2.2.3. Scenario specified through API
2.2.4. IDE plugins
2.2.5. Filtering properties
2.3. Running PerfCake
2.3.1. Command line parameters
2.3.2. Running scenarios from Maven
2.3.3. Logging
2.3.4. Results Replay
2.3.5. Debug Agent
2.4. What to take care of during execution
2.5. Exit codes
2.6. Migrating scenarios to latest version
2.6.1. From v1.0 to v2.x
Migration steps
2.6.2. From v2.x to v3.x
Migration steps
Scenario conversion using XSLT
2.6.3. From v3.x to v4.x
Migration steps
2.6.4. From v4.x to v5.x
Migration steps
Scenario conversion using XSLT
2.6.5. From v5.x to v6.x
Migration steps
2.6.6. From v6.x to v7.x
Migration steps
3. General Usage
3.1. PerfCake: Performance Testing Scenarios
3.2. Performance Engineering
3.3. YouTube Channels
4. Reference Guide
4.1. How - Generating load
4.1.1. DefaultMessageGenerator
4.1.2. ConstantSpeedMessageGenerator
4.1.3. CustomProfileGenerator
CsvProfile
4.1.4. RampUpDownGenerator
4.2. Where - Sending messages
4.2.1. CamelSender
4.2.2. CoapSender
4.2.3. CommandSender
4.2.4. DummySender
4.2.5. GroovySender
4.2.6. HttpSender
4.2.7. HttpsSender
4.2.8. ChannelDatagramSender
4.2.9. ChannelFileSender
4.2.10. ChannelSocketSender
4.2.11. JdbcSender
4.2.12. Jms[11]Sender
4.2.13. LdapSender
4.2.14. MqttSender
4.2.15. OauthHttpSender
4.2.16. PlainSocketSender
4.2.17. RequestResponseJms[11]Sender
4.2.18. ScriptSender
4.2.19. SslSocketSender
4.2.20. WebSocketSender
4.3. Receiving messages
4.3.1. HttpReceiver
4.4. Correlating messages
4.4.1. GenerateHeaderCorrelator
4.5. What - Messages
4.5.1. Filtering and templates
4.6. Sequences
4.6.1. PrimitiveNumberSequence
4.6.2. NumberSequence
4.6.3. RandomSequence
4.6.4. RandomUuidSequence
4.6.5. ThreadIdSequence
4.6.6. TimeStampSequence
4.6.7. FileLinesSequence
4.6.8. FilesContentSequence
4.7. Reporting
4.7.1. Reporters
ClassifyingReporter
GeolocationReporter
IterationsPerSecondReporter
MemoryUsageReporter
ResponseTimeHistogramReporter
ResponseTimeStatsReporter
ThroughputStatsReporter
WarmUpReporter
RawReporter
4.7.2. Destinations
ChartDestination
ConsoleDestination
CsvDestination
ElasticsearchDestination
InfluxDbDestination
Log4jDestination
4.8. Validation
4.8.1. Validators
DictionaryValidator
PrintingValidator
RegExpValidator
RulesValidator
ScriptValidator
5. Result repository
6. Extending PerfCake
6.1. Client libraries
6.2. Custom components - Plugins
7. Troubleshooting PerfCake
7.1. Running in Virtual Environment
8. Changelog

List of Figures

1.1. Your first performance test chart report
2.1. Architecture Overview
2.2. JMX tree with PerfCake debug information in jvisualvm
4.1. RampUpDownGenerator time chart
4.2. ChartDestination example chart

List of Tables

2.1. Examples of templates and how they are rendered
2.2. Available PerfCake internal properties
2.3. PerfCake CLI arguments
2.4. PerfCake recognized properties
2.5. PerfCake Exit Codes
2.6. Renamed classes in PerfCake v3.x
4.1. Run options
4.2. DefaultMessageGenerator properties
4.3. ConstantSpeedMessageGenerator properties
4.4. CustomProfileGenerator properties
4.5. RampUpDownGenerator properties
4.6. CoapSender properties
4.7. CommandSender properties
4.8. DummySender properties
4.9. GroovySender properties
4.10. HttpSender properties
4.11. HttpsSender additional properties
4.12. ChannelDatagramSender properties
4.13. ChannelFileSender properties
4.14. ChannelSocketSender properties
4.15. JdbcSender properties
4.16. JmsSender properties
4.17. HttpSender properties
4.18. MqttSender properties
4.19. HttpsSender additional properties
4.20. RequestResponseJms[11]Sender properties
4.21. ScriptSender properties
4.22. SslSocketSender additional properties
4.23. WebSocketSender properties
4.24. HttpReceiver properties
4.25. NumberSequence properties
4.26. RandomSequence properties
4.27. FileLinesSequence properties
4.28. FilesContentSequence properties
4.29. ClassifyingReporter properties
4.30. GeolocationReporter properties
4.31. GeolocationReporter result names
4.32. IterationsPerSecondReporter result names
4.33. PerfCake agent properties
4.34. MemoryUsageReporter properties
4.35. MemoryUsageReporter result names
4.36. ResponseTimeHistogramReporter properties
4.37. ResponseTimeStatsReporter properties
4.38. ResponseTimeStatsReporter result names
4.39. ThroughputStatsReporter properties
4.40. ThroughputStatsReporter result names
4.41. WarmUpReporter properties
4.42. RawReporter properties
4.43. Destination period options
4.44. ChartDestination properties
4.45. ConsoleDestination properties
4.46. CsvDestination properties
4.47. ElasticsearchDestination properties
4.48. InfluxDbDestination properties
4.49. Log4jDestination properties
4.50. DictionaryValidator properties
4.51. ScriptValidator properties

List of Examples

2.1. Loading of a scenario definition and its execution from API
2.2. Executing a scenario with a single method call using PerfCake API
2.3. Complete scenario definition and execution using its API
2.4. An example of a scenario with properties
2.5. An example of a scenario with combined property replacement strategies
2.6. PerfCake Maven plugin sample configuration
2.7. Sample usage of the results replay mode
2.8. Old sequence configuration in XML
2.9. New sequence configuration in XML
2.10. Old Sequence implementation
2.11. New Sequence implementation
4.1. An example of the run configuration in a scenario:
4.2. An example of DefaultMessageGenerator configuration
4.3. An example of ConstantSpeedMessageGenerator configuration
4.4. An example of CustomProfileGenerator configuration
4.5. Sample profile specified in a CSV file
4.6. An example of RampUpDownGenerator configuration
4.7. An example of a Sender configuration
4.8. An example of CamelSender configuration
4.9. An example of CoapSender configuration
4.10. An example of CommandSender configuration
4.11. An example of DummySender configuration
4.12. An example of GroovySender configuration
4.13. An example of HttpSender configuration
4.14. An example of HttpsSender configuration
4.15. An example of JdbcSender configuration
4.16. An example of JmsSender configuration
4.17. An example of LdapSender configuration
4.18. An example of MqttSender configuration
4.19. An example of OauthHttpSender configuration
4.20. An example of PlainSocketSender configuration
4.21. An example of RequestResponseJmsSender configuration
4.22. An example of ScriptSender configuration
4.23. An example of SslSocketSender configuration
4.24. An example of WebSocketSender configuration
4.25. An example of a Receiver configuration
4.26. An example of HttpReceiver configuration
4.27. An example of a correlator configuration
4.28. An example of GenerateHeaderCorrelator usage
4.29. An example of a simple message configuration:
4.30. An example of multiple messages configuration:
4.31. An example of a Sequence configuration
4.32. An example of PrimitiveNumberSequence configuration
4.33. An example of NumberSequence configuration
4.34. An example of RandomSequence configuration
4.35. An example of RandomUuidSequence configuration
4.36. An example of ThreadIdSequence configuration
4.37. An example of TimeStampSequence configuration
4.38. An example of FileLinesSequence configuration
4.39. An example of FilesContentSequence configuration
4.40. An example reporting configuration:
4.41. An example of a disabled reporter:
4.42. An example of ClassifyingReporter configuration
4.43. An example of the output when ClassifyingReporter is used
4.44. An example of GeolocationReporter configuration
4.45. An example of IterationsPerSecondReporter configuration
4.46. JVM argument to attach PerfCake agent to the tested JVM
4.47. PerfCake JVM argument example
4.48. Attaching to running JVM
4.49. An example of MemoryUsageReporter configuration
4.50. An example of ResponseTimeHistogramReporter configuration
4.51. An example of ResponseTimeStatsReporter configuration
4.52. An example of ResponseTimeStatsReporter configuration with histogram
4.53. An example of ThroughputStatsReporter configuration with a sliding window over last 30 iterations
4.54. An example of output with the above configuration
4.55. An example of WarmUpReporter configuration
4.56. An example of RawReporter configuration
4.57. An example of the period configuration in a destination:
4.58. An example of ChartDestination configuration
4.59. An example of ConsoleDestination configuration
4.60. An example of CsvDestination configuration
4.61. Sample output of CsvDestination
4.62. An example of a ElasticsearchDestination configuration
4.63. An example of a InfluxDbDestination configuration
4.64. An example of Log4jDestination configuration
4.65. An example of validation configuration:
4.66. An example of DictionaryValidator configuration
4.67. An example of ScriptValidator configuration
4.68. An example of RegExpValidator configuration
4.69. RulesValidator rules
4.70. An example of RulesValidator configuration
4.71. An example of ScriptValidator configuration