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 | M/O | Description |
|---|---|---|---|
| callsign | string | mandatory | Plugin instance name (default: PerformanceMonitor) |
| classname | string | mandatory | Class name: PerformanceMonitor |
| locator | string | mandatory | Library name: libThunderPerformanceMonitor.so |
| startmode | string | mandatory | Determines in which state the plugin should be moved to at startup of 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:
Built-in methods:
| Method | Description |
|---|---|
| versions | Retrieves a list of JSON-RPC interfaces offered by this service |
| exists | Checks if a JSON-RPC method or property exists |
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 |
versions method
Retrieves a list of JSON-RPC interfaces offered by this service.
This method takes no parameters.
| Name | Type | M/O | Description |
|---|---|---|---|
| result | array | mandatory | A list ofsinterfaces with their version numbers Array length must be at most 255 elements. |
| result[#] | object | mandatory | ... |
| result[#].name | string | mandatory | Name of the interface |
| result[#].major | integer | mandatory | Major part of version number |
| result[#].minor | integer | mandatory | Minor part of version number |
| result[#].patch | integer | mandatory | Patch part of version version number |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.versions"
}{
"jsonrpc": "2.0",
"id": 42,
"result": [
{
"name": "JMyInterface",
"major": 1,
"minor": 0,
"patch": 0
}
]
}exists method
Checks if a JSON-RPC method or property exists.
This method will return True for the following methods/properties: measurement, versions, exists, clear, send, receive, exchange.
| Name | Type | M/O | Description |
|---|---|---|---|
| params | object | mandatory | ... |
| params.method | string | mandatory | Name of the method or property to look up |
| Name | Type | M/O | Description |
|---|---|---|---|
| result | boolean | mandatory | Denotes if the method exists or not |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.exists",
"params": {
"method": "measurement"
}
}{
"jsonrpc": "2.0",
"id": 42,
"result": false
}clear method
Clear all performance data collected.
This method takes no parameters.
| Name | Type | M/O | Description |
|---|---|---|---|
| result | null | mandatory | Always null (default: None) |
{
"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 | M/O | Description |
|---|---|---|---|
| params | object | mandatory | ... |
| params?.data | string | optional | Any string data upto the size specified in the length |
| params?.length | integer | optional | Size of the data |
| params?.duration | integer | optional | Duration of the measurements |
| Name | Type | M/O | Description |
|---|---|---|---|
| result | integer | mandatory | 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 | M/O | Description |
|---|---|---|---|
| params | integer | mandatory | Size of data to be provided by the jsonrpc interface |
| Name | Type | M/O | Description |
|---|---|---|---|
| result | object | mandatory | ... |
| result?.data | string | optional | Any string data upto the size specified in the length |
| result?.length | integer | optional | Size of the data |
| result?.duration | integer | optional | Duration of the measurements |
{
"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 | M/O | Description |
|---|---|---|---|
| params | object | mandatory | ... |
| params?.data | string | optional | Any string data upto the size specified in the length |
| params?.length | integer | optional | Size of the data |
| params?.duration | integer | optional | Duration of the measurements |
| Name | Type | M/O | Description |
|---|---|---|---|
| result | object | mandatory | ... |
| result?.data | string | optional | Any string data upto the size specified in the length |
| result?.length | integer | optional | Size of the data |
| result?.duration | integer | optional | Duration of the measurements |
{
"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 | R/W | Description |
|---|---|---|
| measurement | read-only | 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.
The package size parameter shall be passed as the index to the property, i.e.
measurement@<package-size>.
| Name | Type | M/O | Description |
|---|---|---|---|
| package-size | string | mandatory | Size of package whose statistics info has to be retrieved |
| Name | Type | M/O | Description |
|---|---|---|---|
| (property) | object | mandatory | Retrieve the performance measurement against given package size. Measurements will be provided in milliseconds |
| (property).serialization | object | mandatory | Time taken to complete serialization |
| (property).serialization?.minimum | integer | optional | Minimum value of measurements |
| (property).serialization?.maximum | integer | optional | Maximum value of measurements |
| (property).serialization?.average | integer | optional | Average value of measurements |
| (property).serialization?.count | integer | optional | How many times measurement has been collected |
| (property).deserialization | object | mandatory | Time taken to complete deserialization |
| (property).deserialization?.minimum | integer | optional | Minimum value of measurements |
| (property).deserialization?.maximum | integer | optional | Maximum value of measurements |
| (property).deserialization?.average | integer | optional | Average value of measurements |
| (property).deserialization?.count | integer | optional | How many times measurement has been collected |
| (property).execution | object | mandatory | Time taken to complete execution |
| (property).execution?.minimum | integer | optional | Minimum value of measurements |
| (property).execution?.maximum | integer | optional | Maximum value of measurements |
| (property).execution?.average | integer | optional | Average value of measurements |
| (property).execution?.count | integer | optional | How many times measurement has been collected |
| (property).threadpool | object | mandatory | Time taken to complete threadpool wait |
| (property).threadpool?.minimum | integer | optional | Minimum value of measurements |
| (property).threadpool?.maximum | integer | optional | Maximum value of measurements |
| (property).threadpool?.average | integer | optional | Average value of measurements |
| (property).threadpool?.count | integer | optional | How many times measurement has been collected |
| (property).communication | object | mandatory | Time taken to complete communication |
| (property).communication?.minimum | integer | optional | Minimum value of measurements |
| (property).communication?.maximum | integer | optional | Maximum value of measurements |
| (property).communication?.average | integer | optional | Average value of measurements |
| (property).communication?.count | integer | optional | How many times measurement has been collected |
| (property).total | object | mandatory | Time taken to complete whole jsonrpc process |
| (property).total?.minimum | integer | optional | Minimum value of measurements |
| (property).total?.maximum | integer | optional | Maximum value of measurements |
| (property).total?.average | integer | optional | Average value of measurements |
| (property).total?.count | integer | optional | How many times measurement has been collected |
| Name | Type | M/O | Description |
|---|---|---|---|
| (property) | null | mandatory | Always null (default: None) |
{
"jsonrpc": "2.0",
"id": 42,
"method": "PerformanceMonitor.1.measurement@1000"
}{
"jsonrpc": "2.0",
"id": 42,
"result": null
}