Skip to content

Latest commit

 

History

History
369 lines (277 loc) · 10.5 KB

PerformanceMonitorPlugin.md

File metadata and controls

369 lines (277 loc) · 10.5 KB

Performance Monitor Plugin

Version: 1.0

Status: ⚫⚪⚪

PerformanceMonitor plugin for Thunder framework.

Table of Contents

Introduction

Scope

This document describes purpose and functionality of the PerformanceMonitor plugin. It includes detailed specification about its configuration, methods and properties provided.

Case Sensitivity

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.

Acronyms, Abbreviations and Terms

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.

References

Ref ID Description
HTTP HTTP specification
JSON-RPC JSON-RPC 2.0 specification
JSON JSON specification
Thunder Thunder API Reference

Description

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].

Configuration

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

Interfaces

This plugin implements the following interfaces:

Methods

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.

Parameters

This method takes no parameters.

Result

Name Type Description
result null Always null

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "PerformanceMonitor.1.clear"
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}

send method

Interface to test send data.

Parameters

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)

Result

Name Type Description
result number Size of data received by the jsonrpc interface

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "PerformanceMonitor.1.send",
  "params": {
    "data": "abababababab",
    "length": 0,
    "duration": 0
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": 0
}

receive method

Interface to test receive data.

Parameters

Name Type Description
params number Size of data to be provided by the jsonrpc interface

Result

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)

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "PerformanceMonitor.1.receive",
  "params": 0
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": {
    "data": "abababababab",
    "length": 0,
    "duration": 0
  }
}

exchange method

Interface to test exchange data.

Parameters

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)

Result

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)

Example

Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "PerformanceMonitor.1.exchange",
  "params": {
    "data": "abababababab",
    "length": 0,
    "duration": 0
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": {
    "data": "abababababab",
    "length": 0,
    "duration": 0
  }
}

Properties

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.

Value

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.

Result

Name Type Description
result null Always null

Example

Get Request

{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "PerformanceMonitor.1.measurement@1000"
}

Get Response

{
  "jsonrpc": "2.0",
  "id": 42,
  "result": null
}