reference/mongodb/mongodb/driver/server/getlatency.xml
bd6e6603b4614c35d9b63c8d157a98569f2358df
...
...
@@ -4,19 +4,20 @@
4
4
<refentry xml:id="mongodb-driver-server.getlatency" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
5
<refnamediv>
6
6
<refname>MongoDB\Driver\Server::getLatency</refname>
7
-
<refpurpose>Returns the latency of this server</refpurpose>
7
+
<refpurpose>Returns the latency of this server in milliseconds</refpurpose>
8
8
</refnamediv>
9
9

10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<modifier>final</modifier> <modifier>public</modifier> <type>string</type><methodname>MongoDB\Driver\Server::getLatency</methodname>
13
+
<modifier>final</modifier> <modifier>public</modifier> <type class="union"><type>integer</type><type>null</type></type><methodname>MongoDB\Driver\Server::getLatency</methodname>
14
14
<void />
15
15
</methodsynopsis>
16
16
<para>
17
-
Returns the latency of this server (i.e. the client&apos;s measured
17
+
Returns the latency of this server in milliseconds. This is the client&apos;s
18
+
measured
18
19
<link xlink:href="&url.mongodb.sdam;#round-trip-time">round trip time</link>
19
-
of a <literal>hello</literal> command).
20
+
of a <literal>hello</literal> command.
20
21
</para>
21
22
</refsect1>
22
23

...
...
@@ -28,7 +29,8 @@
28
29
<refsect1 role="returnvalues">
29
30
&reftitle.returnvalues;
30
31
<para>
31
-
Returns the latency of this server.
32
+
Returns the latency of this server in milliseconds, or &null; if no latency
33
+
has been measured (e.g. client is connected to a load balancer).
32
34
</para>
33
35
</refsect1>
34
36

...
...
@@ -39,6 +41,31 @@
39
41
</simplelist>
40
42
</refsect1>
41
43

44
+
<refsect1 role="changelog">
45
+
&reftitle.changelog;
46
+
<para>
47
+
<informaltable>
48
+
<tgroup cols="2">
49
+
<thead>
50
+
<row>
51
+
<entry>&Version;</entry>
52
+
<entry>&Description;</entry>
53
+
</row>
54
+
</thead>
55
+
<tbody>
56
+
<row>
57
+
<entry>PECL mongodb 1.11.0</entry>
58
+
<entry>
59
+
This method will return &null; if no latency has been measured. In
60
+
earlier versions, an integer was always returned and an unset value
61
+
might be reported as <literal>-1</literal>.
62
+
</entry>
63
+
</row>
64
+
</tbody>
65
+
</tgroup>
66
+
</informaltable>
67
+
</para>
68
+
</refsect1>
42
69

43
70
<refsect1 role="examples">
44
71
&reftitle.examples;
...
...
@@ -67,11 +94,11 @@ int(592)
67
94
</example>
68
95
</refsect1>
69
96

70
-

71
97
<refsect1 role="seealso">
72
98
&reftitle.seealso;
73
99
<simplelist>
74
100
<member><function>MongoDB\Driver\Server::getInfo</function></member>
101
+
<member><function>MongoDB\Driver\ServerDescription::getRoundTripTime</function></member>
75
102
<member><link xlink:href="&url.mongodb.sdam;">Server Discovery and Monitoring Specification</link></member>
76
103
</simplelist>
77
104
</refsect1>
78
105