Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ $client->mark([
]);
```

If you want to use the inline protocol directly you have to use the UDP/IP adapter directly
If you want to use the line protocol directly you have to use the UDP/IP adapter directly

```
$udp = new UdpAdapter($options);
Expand Down Expand Up @@ -272,20 +272,20 @@ Corley\Benchmarks\InfluxDB\AdapterEvent
sendDataUsingUdpAdapter : [1,000 ] [0.0000905156136] [11,047.81773]
```

### Message to inline protocol conversion
### Message to line protocol conversion

As you know the SDK will provide a single interface in order to send data to
InfluxDB (concise or expanded).

The impact of message to inline protocol conversion is:
The impact of message to line protocol conversion is:

```
Corley\Benchmarks\InfluxDB\MessageToInlineProtocolEvent
Corley\Benchmarks\InfluxDB\MessageToLineProtocolEvent
Method Name Iterations Average Time Ops/second
---------------------------------------------------- ------------ -------------- -------------
convertMessageToInlineProtocolWithNoTags : [10,000 ] [0.0000343696594] [29,095.42942]
convertMessageToInlineProtocolWithGlobalTags : [10,000 ] [0.0000437165260] [22,874.64469]
convertMessageToInlineProtocolWithDifferentTagLevels: [10,000 ] [0.0000493728638] [20,254.04086]
convertMessageToLineProtocolWithNoTags : [10,000 ] [0.0000343696594] [29,095.42942]
convertMessageToLineProtocolWithGlobalTags : [10,000 ] [0.0000437165260] [22,874.64469]
convertMessageToLineProtocolWithDifferentTagLevels: [10,000 ] [0.0000493728638] [20,254.04086]
```

### Query Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

use Athletic\AthleticEvent;

class MessageToInlineProtocolEvent extends AthleticEvent
class MessageToLineProtocolEvent extends AthleticEvent
{
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithNoTags()
public function convertMessageToLineProtocolWithNoTags()
{
\InfluxDB\Adapter\message_to_inline_protocol(
\InfluxDB\Adapter\message_to_line_protocol(
[
"points" => [
[
Expand All @@ -28,9 +28,9 @@ public function convertMessageToInlineProtocolWithNoTags()
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithGlobalTags()
public function convertMessageToLineProtocolWithGlobalTags()
{
\InfluxDB\Adapter\message_to_inline_protocol(
\InfluxDB\Adapter\message_to_line_protocol(
[
"tags" => [
"dc" => "eu-west-1",
Expand All @@ -51,9 +51,9 @@ public function convertMessageToInlineProtocolWithGlobalTags()
/**
* @iterations 10000
*/
public function convertMessageToInlineProtocolWithDifferentTagLevels()
public function convertMessageToLineProtocolWithDifferentTagLevels()
{
\InfluxDB\Adapter\message_to_inline_protocol(
\InfluxDB\Adapter\message_to_line_protocol(
[
"tags" => [
"dc" => "eu-west-1",
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/GuzzleAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function send(array $message)
"db" => $message["database"],
"retentionPolicy" => $message["retentionPolicy"],
],
"body" => message_to_inline_protocol($message)
"body" => message_to_line_protocol($message)
];

$endpoint = $this->getHttpSeriesEndpoint();
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/UdpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function send(array $message)
$message["tags"] = array_replace_recursive($this->getOptions()->getTags(), $message["tags"]);
}

$message = message_to_inline_protocol($message);
$message = message_to_line_protocol($message);

$this->write($message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use DateTime;

function message_to_inline_protocol(array $message)
function message_to_line_protocol(array $message)
{
if (!array_key_exists("points", $message)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Adapter/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class HelpersTest extends \PHPUnit_Framework_TestCase
/**
* @dataProvider getElements
*/
public function testListToInlineValues($message, $result, $escape)
public function testListToLineValues($message, $result, $escape)
{
$this->assertEquals($result, list_to_string($message, $escape));
}
Expand Down