Skip to content

Commit 6bcb102

Browse files
committed
Merge pull request #47 from corley/feature/line-rename
Rename inline protocol to line protocol
2 parents 1928d59 + 54c1c67 commit 6bcb102

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ $client->mark([
200200
]);
201201
```
202202

203-
If you want to use the inline protocol directly you have to use the UDP/IP adapter directly
203+
If you want to use the line protocol directly you have to use the UDP/IP adapter directly
204204

205205
```
206206
$udp = new UdpAdapter($options);
@@ -272,20 +272,20 @@ Corley\Benchmarks\InfluxDB\AdapterEvent
272272
sendDataUsingUdpAdapter : [1,000 ] [0.0000905156136] [11,047.81773]
273273
```
274274

275-
### Message to inline protocol conversion
275+
### Message to line protocol conversion
276276

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

280-
The impact of message to inline protocol conversion is:
280+
The impact of message to line protocol conversion is:
281281

282282
```
283-
Corley\Benchmarks\InfluxDB\MessageToInlineProtocolEvent
283+
Corley\Benchmarks\InfluxDB\MessageToLineProtocolEvent
284284
Method Name Iterations Average Time Ops/second
285285
---------------------------------------------------- ------------ -------------- -------------
286-
convertMessageToInlineProtocolWithNoTags : [10,000 ] [0.0000343696594] [29,095.42942]
287-
convertMessageToInlineProtocolWithGlobalTags : [10,000 ] [0.0000437165260] [22,874.64469]
288-
convertMessageToInlineProtocolWithDifferentTagLevels: [10,000 ] [0.0000493728638] [20,254.04086]
286+
convertMessageToLineProtocolWithNoTags : [10,000 ] [0.0000343696594] [29,095.42942]
287+
convertMessageToLineProtocolWithGlobalTags : [10,000 ] [0.0000437165260] [22,874.64469]
288+
convertMessageToLineProtocolWithDifferentTagLevels: [10,000 ] [0.0000493728638] [20,254.04086]
289289
```
290290

291291
### Query Builder

benchmarks/Benchmarks/InfluxDB/MessageToInlineProtocolEvent.php renamed to benchmarks/Benchmarks/InfluxDB/MessageToLineProtocolEvent.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
use Athletic\AthleticEvent;
55

6-
class MessageToInlineProtocolEvent extends AthleticEvent
6+
class MessageToLineProtocolEvent extends AthleticEvent
77
{
88
/**
99
* @iterations 10000
1010
*/
11-
public function convertMessageToInlineProtocolWithNoTags()
11+
public function convertMessageToLineProtocolWithNoTags()
1212
{
13-
\InfluxDB\Adapter\message_to_inline_protocol(
13+
\InfluxDB\Adapter\message_to_line_protocol(
1414
[
1515
"points" => [
1616
[
@@ -28,9 +28,9 @@ public function convertMessageToInlineProtocolWithNoTags()
2828
/**
2929
* @iterations 10000
3030
*/
31-
public function convertMessageToInlineProtocolWithGlobalTags()
31+
public function convertMessageToLineProtocolWithGlobalTags()
3232
{
33-
\InfluxDB\Adapter\message_to_inline_protocol(
33+
\InfluxDB\Adapter\message_to_line_protocol(
3434
[
3535
"tags" => [
3636
"dc" => "eu-west-1",
@@ -51,9 +51,9 @@ public function convertMessageToInlineProtocolWithGlobalTags()
5151
/**
5252
* @iterations 10000
5353
*/
54-
public function convertMessageToInlineProtocolWithDifferentTagLevels()
54+
public function convertMessageToLineProtocolWithDifferentTagLevels()
5555
{
56-
\InfluxDB\Adapter\message_to_inline_protocol(
56+
\InfluxDB\Adapter\message_to_line_protocol(
5757
[
5858
"tags" => [
5959
"dc" => "eu-west-1",

src/Adapter/GuzzleAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function send(array $message)
2929
"db" => $message["database"],
3030
"retentionPolicy" => $message["retentionPolicy"],
3131
],
32-
"body" => message_to_inline_protocol($message)
32+
"body" => message_to_line_protocol($message)
3333
];
3434

3535
$endpoint = $this->getHttpSeriesEndpoint();

src/Adapter/UdpAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function send(array $message)
1313
$message["tags"] = array_replace_recursive($this->getOptions()->getTags(), $message["tags"]);
1414
}
1515

16-
$message = message_to_inline_protocol($message);
16+
$message = message_to_line_protocol($message);
1717

1818
$this->write($message);
1919
}

src/Adapter/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use DateTime;
55

6-
function message_to_inline_protocol(array $message)
6+
function message_to_line_protocol(array $message)
77
{
88
if (!array_key_exists("points", $message)) {
99
return;

tests/unit/Adapter/HelpersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class HelpersTest extends \PHPUnit_Framework_TestCase
66
/**
77
* @dataProvider getElements
88
*/
9-
public function testListToInlineValues($message, $result, $escape)
9+
public function testListToLineValues($message, $result, $escape)
1010
{
1111
$this->assertEquals($result, list_to_string($message, $escape));
1212
}

0 commit comments

Comments
 (0)