Version: 1.0
Status: ⚫⚪⚪
PerformanceMonitor plugin for Thunder framework.
This document describes purpose and functionality of the PerformanceMonitor plugin. It includes detailed specification about its configuration, methods and properties provided.
All identifiers of the interfaces described in this document are case-sensitive. Thus, unless stated otherwise, all keywords, entities, properties, relations and actions should be treated as such.
The table below provides and overview of acronyms used in this document and their definitions.
Acronym | Description |
---|---|
API | Application Programming Interface |
HTTP | Hypertext Transfer Protocol |
JSON | JavaScript Object Notation; a data interchange format |
JSON-RPC | A remote procedure call protocol encoded in JSON |
The table below provides and overview of terms and abbreviations used in this document and their definitions.
Term | Description |
---|---|
callsign | The name given to an instance of a plugin. One plugin can be instantiated multiple times, but each instance the instance name, callsign, must be unique. |
Ref ID | Description |
---|---|
HTTP | HTTP specification |
JSON-RPC | JSON-RPC 2.0 specification |
JSON | JSON specification |
Thunder | Thunder API Reference |
Retrieve the performance measurement against given package size.
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].
The table below lists configuration options of the plugin.
Name | Type | Description |
---|---|---|
callsign | string | Plugin instance name (default: PerformanceMonitor) |
classname | string | Class name: PerformanceMonitor |
locator | string | Library name: libThunderPerformanceMonitor.so |
startmode | string | Determines if the plugin shall be started automatically along with the framework |
This plugin implements the following interfaces:
- PerformanceMonitor.json (version 1.0.0) (uncompliant-collapsed format)
The following methods are provided by the PerformanceMonitor plugin:
PerformanceMonitor interface methods:
Method | Description |
---|---|
clear | Clear all performance data collected |
send | Interface to test send data |
receive | Interface to test receive data |
exchange | Interface to test exchange data |
clear method
Clear all performance data collected.
This method takes no parameters.
Name | Type | Description |
---|---|---|
result | null | Always null |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.clear"
}
{
"jsonrpc": "2.0",
"id": 42,
"result": null
}
send method
Interface to test send data.
Name | Type | Description |
---|---|---|
params | object | |
params?.data | string | (optional) Any string data upto the size specified in the length |
params?.length | number | (optional) |
params?.duration | number | (optional) |
Name | Type | Description |
---|---|---|
result | number | Size of data received by the jsonrpc interface |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.send",
"params": {
"data": "abababababab",
"length": 0,
"duration": 0
}
}
{
"jsonrpc": "2.0",
"id": 42,
"result": 0
}
receive method
Interface to test receive data.
Name | Type | Description |
---|---|---|
params | number | Size of data to be provided by the jsonrpc interface |
Name | Type | Description |
---|---|---|
result | object | |
result?.data | string | (optional) Any string data upto the size specified in the length |
result?.length | number | (optional) |
result?.duration | number | (optional) |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.receive",
"params": 0
}
{
"jsonrpc": "2.0",
"id": 42,
"result": {
"data": "abababababab",
"length": 0,
"duration": 0
}
}
exchange method
Interface to test exchange data.
Name | Type | Description |
---|---|---|
params | object | |
params?.data | string | (optional) Any string data upto the size specified in the length |
params?.length | number | (optional) |
params?.duration | number | (optional) |
Name | Type | Description |
---|---|---|
result | object | |
result?.data | string | (optional) Any string data upto the size specified in the length |
result?.length | number | (optional) |
result?.duration | number | (optional) |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.exchange",
"params": {
"data": "abababababab",
"length": 0,
"duration": 0
}
}
{
"jsonrpc": "2.0",
"id": 42,
"result": {
"data": "abababababab",
"length": 0,
"duration": 0
}
}
The following properties are provided by the PerformanceMonitor plugin:
PerformanceMonitor interface properties:
Property | Description |
---|---|
measurement RO | Retrieve the performance measurement against given package size |
measurement property
Provides access to the retrieve the performance measurement against given package size. Measurements will be provided in milliseconds.
This property is read-only.
Name | Type | Description |
---|---|---|
(property) | object | Retrieve the performance measurement against given package size. Measurements will be provided in milliseconds |
(property).serialization | object | Time taken to complete serialization |
(property).serialization?.minimum | number | (optional) |
(property).serialization?.maximum | number | (optional) |
(property).serialization?.average | number | (optional) |
(property).serialization?.count | number | (optional) |
(property).deserialization | object | Time taken to complete deserialization |
(property).deserialization?.minimum | number | (optional) |
(property).deserialization?.maximum | number | (optional) |
(property).deserialization?.average | number | (optional) |
(property).deserialization?.count | number | (optional) |
(property).execution | object | Time taken to complete execution |
(property).execution?.minimum | number | (optional) |
(property).execution?.maximum | number | (optional) |
(property).execution?.average | number | (optional) |
(property).execution?.count | number | (optional) |
(property).threadpool | object | Time taken to complete threadpool wait |
(property).threadpool?.minimum | number | (optional) |
(property).threadpool?.maximum | number | (optional) |
(property).threadpool?.average | number | (optional) |
(property).threadpool?.count | number | (optional) |
(property).communication | object | Time taken to complete communication |
(property).communication?.minimum | number | (optional) |
(property).communication?.maximum | number | (optional) |
(property).communication?.average | number | (optional) |
(property).communication?.count | number | (optional) |
(property).total | object | Time taken to complete whole jsonrpc process |
(property).total?.minimum | number | (optional) |
(property).total?.maximum | number | (optional) |
(property).total?.average | number | (optional) |
(property).total?.count | number | (optional) |
The package size argument shall be passed as the index to the property, e.g. PerformanceMonitor.1.measurement@1000. Size of package whose statistics info has to be retrieved.
Name | Type | Description |
---|---|---|
result | null | Always null |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.measurement@1000"
}
{
"jsonrpc": "2.0",
"id": 42,
"result": null
}