Files
librenms/lib/influxdb-php-sdk/benchmarks/Benchmarks/InfluxDB/MessageToInlineProtocolEvent.php
T
laf 0ee83437e3 Add 'lib/influxdb-php-sdk/' from commit '1928d59eb90bfcba40a957074987c5311afd4e3b'
git-subtree-dir: lib/influxdb-php-sdk
git-subtree-mainline: 15a338061d
git-subtree-split: 1928d59eb9
2015-08-09 15:52:58 +00:00

77 lines
1.9 KiB
PHP

<?php
namespace Corley\Benchmarks\InfluxDB;
use Athletic\AthleticEvent;
class MessageToInlineProtocolEvent extends AthleticEvent
{
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithNoTags()
{
\InfluxDB\Adapter\message_to_inline_protocol(
[
"points" => [
[
"measurement" => "vm-serie",
"fields" => [
"cpu" => 18.12,
"free" => 712423,
],
],
]
]
);
}
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithGlobalTags()
{
\InfluxDB\Adapter\message_to_inline_protocol(
[
"tags" => [
"dc" => "eu-west-1",
],
"points" => [
[
"measurement" => "vm-serie",
"fields" => [
"cpu" => 18.12,
"free" => 712423,
],
],
]
]
);
}
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithDifferentTagLevels()
{
\InfluxDB\Adapter\message_to_inline_protocol(
[
"tags" => [
"dc" => "eu-west-1",
],
"points" => [
[
"measurement" => "vm-serie",
"tags" => [
"server" => "tc12",
],
"fields" => [
"cpu" => 18.12,
"free" => 712423,
],
],
]
]
);
}
}