Merge lp:~kent/libmemcached/KBDocs4 into lp:~tangent-org/libmemcached/trunk

Proposed by KentBozlinski
Status: Merged
Merge reported by: Brian Aker
Merged at revision: not available
Proposed branch: lp:~kent/libmemcached/KBDocs4
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 491 lines (+120/-95)
11 files modified
docs/bin/memaslap.rst (+9/-7)
docs/hashkit_create.rst (+14/-4)
docs/hashkit_functions.rst (+1/-2)
docs/hashkit_value.rst (+2/-2)
docs/libhashkit.rst (+2/-1)
docs/libmemcached.rst (+13/-13)
docs/libmemcached_configuration.rst (+1/-1)
docs/libmemcached_examples.rst (+16/-8)
docs/libmemcachedutil.rst (+6/-7)
docs/memcached_analyze.rst (+14/-14)
docs/memcached_append.rst (+42/-36)
To merge this branch: bzr merge lp:~kent/libmemcached/KBDocs4
Reviewer Review Type Date Requested Status
Libmemcached-developers Pending
Review via email: mp+65843@code.launchpad.net

Description of the change

Updates to formatting of first ~dozen .rst files.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/bin/memaslap.rst'
2--- docs/bin/memaslap.rst 2011-06-24 19:25:01 +0000
3+++ docs/bin/memaslap.rst 2011-06-24 22:27:28 +0000
4@@ -18,12 +18,14 @@
5 -----------
6
7
8-memaslap is a load generation and benchmark tool for :program:`memcached()`
9-servers. It generates configurable workload such as threads, concurrencies, connections, run time, overwrite, miss rate, key size, value size, get/set proportion, expected throughput, and so on. Furthermore, it also testss data
10+:program:`memaslap` is a load generation and benchmark tool for memcached
11+servers. It generates configurable workload such as threads, concurrencies,
12+connections, run time, overwrite, miss rate, key size, value size, get/set
13+proportion, expected throughput, and so on. Furthermore, it also testss data
14 verification, expire-time verification, UDP, binary protocol, facebook test,
15 replication test, multi-get and reconnection, etc.
16
17-Memslap manages network connections like memcached with
18+Memaslap manages network connections like memcached with
19 libevent. Each thread of memaslap is bound with a CPU core, all
20 the threads don't communicate with each other, and there are several socket
21 connections in each thread. Each connection keeps key size distribution,
22@@ -194,9 +196,9 @@
23
24 Because each thread is self-governed, memaslap can assign
25 different threads to handle different memcached servers. This is just one of
26-the ways in which memaslap testss multiple servers. The only
27+the ways in which memaslap tests multiple servers. The only
28 limitation is that the number of servers cannot be greater than the number
29-of threads. The other way to tests multiple servers is for replication
30+of threads. The other way to test multiple servers is for replication
31 test. Each concurrency has one socket connection to each memcached server.
32 For the implementation, memaslap can set some objects to one
33 memcached server, and get these objects from the other servers.
34@@ -208,7 +210,7 @@
35 Memslap testss both the ASCII protocol and binary protocol,
36 but it runs on the ASCII protocol by default.
37 Memslap by default runs on the TCP protocol, but it also
38-testss UDP. Because UDP is unreliable, dropped packages and out-of-order
39+tests UDP. Because UDP is unreliable, dropped packages and out-of-order
40 packages may occur. Memslap creates a memory buffer to handle
41 these problems. Memslap tries to read all the response data of
42 one command from the server and reorders the response data. If some packages
43@@ -314,7 +316,7 @@
44 concurrency is 16. The user can use “—threads” and “--concurrency” to
45 specify these variables.
46
47-If the system testss setting CPU affinity and the number of threads
48+If the system tests setting CPU affinity and the number of threads
49 specified by the user is greater than 1, memaslap will try to
50 bind each thread to a different CPU core. So if you want to get the best
51 performance memaslap, it is better to specify the number of
52
53=== modified file 'docs/hashkit_create.rst'
54--- docs/hashkit_create.rst 2011-06-19 08:25:48 +0000
55+++ docs/hashkit_create.rst 2011-06-24 22:27:28 +0000
56@@ -48,12 +48,12 @@
57 ------------
58
59
60-:c:func:`hashkit_create()` and :c:func:`hashkit_clone()` will return NULL on failure or
61-non-NULL on success.
62+:c:func:`hashkit_create()` and :c:func:`hashkit_clone()` will return NULL on
63+failure or non-NULL on success.
64
65 :c:func:`hashkit_is_allocated()` returns true if the memory for the hashkit
66-object was allocated inside of :c:func:`hashkit_create()` or :c:func:`hashkit_clone()`,
67-otherwise it is false and was user-supplied memory.
68+object was allocated inside of :c:fucn:`hashkit_create()` or
69+:c:func:`hashkit_clone()`, otherwise it is false and was user-supplied memory.
70
71
72 ----
73@@ -63,3 +63,13 @@
74
75 To find out more information please check:
76 `http://libmemcached.org/ <http://libmemcached.org/>`_
77+
78+
79+
80+--------
81+SEE ALSO
82+--------
83+
84+
85+:manpage:`hashkit_create(3)` :manpage:`hashkit_value(3)` :manpage:`hashkit_set_hash_fn(3)`
86+
87
88=== modified file 'docs/hashkit_functions.rst'
89--- docs/hashkit_functions.rst 2011-05-24 01:36:22 +0000
90+++ docs/hashkit_functions.rst 2011-06-24 22:27:28 +0000
91@@ -71,6 +71,5 @@
92 --------
93
94
95-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
96-hashkit_set_continuum_hash_fn(3)
97+:manpage:`hashkit_create(3)` :manpage:`hashkit_value(3)` :manpage:`hashkit_set_hash_fn(3)` :manpage:`hashkit_set_continuum_hash_fn(3)`
98
99
100=== modified file 'docs/hashkit_value.rst'
101--- docs/hashkit_value.rst 2011-05-24 01:36:22 +0000
102+++ docs/hashkit_value.rst 2011-06-24 22:27:28 +0000
103@@ -26,7 +26,7 @@
104 -----------
105
106
107-The hashkit_value() function generates a 32-bit hash value from the
108+The :c:func:`hashkit_value()` function generates a 32-bit hash value from the
109 given key and key_length. The hash argument is an initialized hashkit
110 object, and distribution type and hash function is used from this
111 object while generating the value.
112@@ -54,5 +54,5 @@
113 --------
114
115
116-hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
117+:manpage:`hashkit_create(3)` :manpage:`hashkit_set_distribution(3)` :manpage:`hashkit_set_hash_fn(3)`
118
119
120=== modified file 'docs/libhashkit.rst'
121--- docs/libhashkit.rst 2011-06-19 02:44:48 +0000
122+++ docs/libhashkit.rst 2011-06-24 22:27:28 +0000
123@@ -15,7 +15,8 @@
124 DESCRIPTION
125 -----------
126
127-:program:'libhashkit' is a small and thread-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached.
128+
129+libhashkit is a small and thread-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached.
130
131
132 ----
133
134=== modified file 'docs/libmemcached.rst'
135--- docs/libmemcached.rst 2011-06-19 02:44:48 +0000
136+++ docs/libmemcached.rst 2011-06-24 22:27:28 +0000
137@@ -33,7 +33,7 @@
138 system, generic in nature, but intended for use in speeding up dynamic web
139 applications by alleviating database load." `http://danga.com/memcached/ <http://danga.com/memcached/>`_
140
141-\ **libmemcached**\ is a small, thread-safe client library for the
142+:program:`libmemcached` is a small, thread-safe client library for the
143 memcached protocol. The code has all been written to allow
144 for both web and embedded usage. It handles the work behind routing
145 individual keys to specific servers specified by the developer (and values are
146@@ -41,16 +41,17 @@
147 a modular and consistent method of object distribution.
148
149 There are multiple implemented routing and hashing methods. See the
150-memcached_behavior_set() manpage for more information.
151+:c:func:`memcached_behavior_set()` manpage for more information.
152
153-All operations are performed against a :c:type:`memcached_st` structure.
154+All operations are performed against a :c:type:`memcached_st` structure.
155 These structures can either be dynamically allocated or statically
156-allocated and then initialized by memcached_create(). Functions have been
157-written in order to encapsulate the :c:type:`memcached_st` . It is not
158+allocated and then initialized by :c:func:`memcached_create()`. Functions have
159+been written in order to encapsulate the :c:type:`memcached_st`. It is not
160 recommended that you operate directly against the structure.
161
162-Nearly all functions return a :c:type:`memcached_return_t`\ value.
163-This value can be translated to a printable string with memcached_strerror(3).
164+Nearly all functions return a :c:type:`memcached_return_t` value.
165+This value can be translated to a printable string with
166+:c:type:`memcached_strerror()`.
167
168 Objects are stored on servers by hashing keys. The hash value maps the key to a particular server. All clients understand how this hashing works, so it is possibly to reliably both push data to a server and retrieve data from a server.
169
170@@ -58,7 +59,7 @@
171
172 Namespaces are supported, and can be used to partition caches so that multiple applications can use the same memcached servers.
173
174-:c:type:`memcached_st` structures are thread-safe, but each thread must
175+:c:type:`memcached_st` structures are thread-safe, but each thread must
176 contain its own structure (that is, if you want to share these among
177 threads you must provide your own locking). No global variables are
178 used in this library.
179@@ -70,7 +71,7 @@
180 AC_SUBST(DEPS_CFLAGS)
181 AC_SUBST(DEPS_LIBS)
182
183-Some features of the library must be enabled through memcached_behavior_set().
184+Some features of the library must be enabled through :c:func:`memcached_behavior_set()`.
185
186 Hope you enjoy it!
187
188@@ -131,10 +132,9 @@
189
190
191 When using threads or forked processes it is important to keep one instance
192-of :c:type:`memcached_st` per process or thread. Without creating your own locking
193-structures you can not share a single :c:type:`memcached_st`. However, you can call
194-memcached_quit(3) on a :c:type:`memcached_st` and then use the resulting cloned
195-structure.
196+of :c:type:`memcached_st` per process or thread. Without creating your own
197+locking structures you can not share a single :c:type:`memcached_st`. However,
198+you can call :c:func:`memcached_quit()` on a :c:type:`memcached_st` and then use the resulting cloned structure.
199
200
201 ----
202
203=== modified file 'docs/libmemcached_configuration.rst'
204--- docs/libmemcached_configuration.rst 2011-06-24 19:25:01 +0000
205+++ docs/libmemcached_configuration.rst 2011-06-24 22:27:28 +0000
206@@ -185,7 +185,7 @@
207 ------
208
209
210-memcached() returns a pointer to the memcached_st that was
211+:c:func:`memcached()` returns a pointer to the memcached_st that was
212 created (or initialized). On an allocation failure, it returns NULL.
213
214
215
216=== modified file 'docs/libmemcached_examples.rst'
217--- docs/libmemcached_examples.rst 2011-05-24 01:36:22 +0000
218+++ docs/libmemcached_examples.rst 2011-06-24 22:27:28 +0000
219@@ -21,6 +21,7 @@
220
221 .. code-block:: c
222
223+Configuring with servers::
224 const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com"
225 memcached_st *memc= memcached(config_string, strlen(config_string);
226 {
227@@ -29,7 +30,8 @@
228 memcached_free(memc);
229
230
231-In the above code you create a \ ``memcached_st``\ object with three server by making use of :manpage:`memcached_create_with_options(3)`.
232+In the above code you create a :c:type:`memcached_st` object with three server
233+by making use of :c:func:`memcached_create_with_options()`.
234
235
236 --------------------------
237@@ -40,6 +42,8 @@
238
239 .. code-block:: c
240
241+Creating a pool of Servers::
242+
243 const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com";
244
245 memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string));
246@@ -62,10 +66,10 @@
247
248
249
250-In the above code you create a \ ``memcached_pool_st``\ object with three
251-server by making use of :manpage:`memcached_pool(3)`.
252+In the above code you create a :c:type:`memcached_pool_st` object with three
253+server by making use of :c:func:`memcached_pool()`.
254
255-When memcached_pool_destroy() all memory will be released that is associated
256+When :c:func:`memcached_pool_destroy()` all memory will be released that is associated
257 with the pool.
258
259
260@@ -77,6 +81,8 @@
261
262 .. code-block:: c
263
264+Adding a value to the Server::
265+
266 char *key= "foo";
267 char *value= "value";
268
269@@ -99,19 +105,21 @@
270
271 .. code-block:: c
272
273+Fetching multiple Values::
274+
275 memcached_return_t rc;
276 char *keys[]= {"fudge", "son", "food"};
277 size_t key_length[]= {5, 3, 4};
278 unsigned int x;
279 uint32_t flags;
280-
281+
282 char return_key[MEMCACHED_MAX_KEY];
283 size_t return_key_length;
284 char *return_value;
285 size_t return_value_length;
286-
287+
288 rc= memcached_mget(memc, keys, key_length, 3);
289-
290+
291 x= 0;
292 while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
293 &return_value_length, &flags, &rc)))
294@@ -122,7 +130,7 @@
295
296
297 Notice that you freed values returned from memcached_fetch(). The define
298-\ ``MEMCACHED_MAX_KEY``\ is provided for usage.
299+:c:type:`MEMCACHED_MAX_KEY` is provided for usage.
300
301
302
303
304=== modified file 'docs/libmemcachedutil.rst'
305--- docs/libmemcachedutil.rst 2011-05-24 01:36:22 +0000
306+++ docs/libmemcachedutil.rst 2011-06-24 22:27:28 +0000
307@@ -23,8 +23,8 @@
308 -----------
309
310
311-\ **libmemcachedutil**\ is a small and thread-safe client library that provides
312-extra functionality built on top of \ **libmemcached**\ .
313+:program:`libmemcachedutil` is a small and thread-safe client library that
314+provides extra functionality built on top of :program:`libmemcached`.
315
316
317 -------
318@@ -32,10 +32,10 @@
319 -------
320
321
322-Do not try to access an instance of \ ``memcached_st``\ from multiple threads
323+Do not try to access an instance of :c:type:`memcached_st` from multiple threads
324 at the same time. If you want to access memcached from multiple threads
325-you should either clone the \ ``memcached_st``\ , or use the memcached pool
326-implementation. see memcached_pool_create(3).
327+you should either clone the :c:type:`memcached_st`, or use the memcached pool
328+implementation. see :c:func:`memcached_pool_create()`.
329
330
331 ----
332@@ -52,6 +52,5 @@
333 --------
334
335
336-:manpage:`libmemcached(3)`
337-:manpage:`memcached_pool_create(3)` :manpage:`memcached_pool_destroy(3)` :manpage:`memcached_pool_pop(3)` :manpage:`memcached_pool_push(3)`
338+:manpage:`libmemcached(3)` :manpage:`memcached_pool_create(3)` :manpage:`memcached_pool_destroy(3)` :manpage:`memcached_pool_pop(3)` :manpage:`memcached_pool_push(3)`
339
340
341=== modified file 'docs/memcached_analyze.rst'
342--- docs/memcached_analyze.rst 2011-05-24 01:36:22 +0000
343+++ docs/memcached_analyze.rst 2011-06-24 22:27:28 +0000
344@@ -24,16 +24,16 @@
345 -----------
346
347
348-libmemcached(3) has the ability to query a memcached server (or collection
349-of servers) for their current state. Queries to find state return a
350-\ ``memcached_analysis_st``\ structure. You are responsible for freeing this structure.
351-
352-memcached_analyze() analyzes useful information based on the provided servers
353-and sets the result to the \ ``memcached_analysis_st``\ structure. The return value
354-must be freed by the calling application.
355-
356-A command line tool, memstat(1) with the option --analyze, is provided so that
357-you do not have to write an application to use this method.
358+:program:`libmemcached` has the ability to query a memcached server (or
359+collection of servers) for their current state. Queries to find state return a
360+:c:type:`memcached_analysis_st` structure. You are responsible for freeing this structure.
361+
362+:c:func:`memcached_analyze()` analyzes useful information based on the
363+provided servers and sets the result to the :c:type:`memcached_analysis_st`
364+structure. The return value must be freed by the calling application.
365+
366+A command line tool, :c:func:`memstat()` with the option :option:`--analyze`,
367+is provided so that you do not have to write an application to use this method.
368
369
370 ------
371@@ -41,11 +41,11 @@
372 ------
373
374
375-A pointer to the allocated \ ``memcached_analysis_st``\ structure on success and
376-a NULL pointer on failure. You may inspect the error detail by checking the
377-\ ``memcached_return_t``\ value.
378+A pointer to the allocated :c:type:`memcached_analysis_st` structure on
379+success and a NULL pointer on failure. You may inspect the error detail by
380+checking the :c:type:`memcached_return_t` value.
381
382-Any method returning a \ ``memcached_analysis_st``\ expects you to free the
383+Any method returning a :c:type:`memcached_analysis_st` expects you to free the
384 memory allocated for it.
385
386
387
388=== modified file 'docs/memcached_append.rst'
389--- docs/memcached_append.rst 2011-05-24 01:36:22 +0000
390+++ docs/memcached_append.rst 2011-06-24 22:27:28 +0000
391@@ -30,43 +30,48 @@
392 -----------
393
394
395-memcached_prepend() and memcached_append are used to
396+:c:func:`memcached_prepend()` and memcached_append are used to
397 modify information on a server. All methods take a key, and its length to
398-store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol.
399-You must supply both a value and a length. Optionally you
400+store the object. Keys are currently limited to 250 characters when using
401+either a version of memcached which is 1.4 or below, or when using the text
402+protocol. You must supply both a value and a length. Optionally you
403 may test an expiration time for the object and a 16 byte value (it is
404-meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
405-
406-memcached_prepend() places a segment of data before the last piece of data
407-stored. Currently expiration and key are not used in the server.
408-
409-memcached_append() places a segment of data at the end of the last piece of
410-data stored. Currently expiration and key are not used in the server.
411-
412-memcached_prepend_by_key() and memcached_append_by_key_by_key(,
413-methods both behave in a similar method as the non key
414-methods. The difference is that they use their group_key parameter to map
415-objects to particular servers.
416-
417-If you are looking for performance, memcached_set() with non-blocking IO is
418-the fastest way to store data on the server.
419-
420-All of the above functions are testsed with the \ ``MEMCACHED_BEHAVIOR_USE_UDP``\
421-behavior enabled. However, when using these operations with this behavior on, there
422-are limits to the size of the payload being sent to the server. The reason for
423-these limits is that the Memcached Server does not allow multi-datagram requests
424+meant to be used as a bitmap). "flags" is a 4byte space that is stored
425+alongside of the main value. Many sub libraries make use of this field,
426+so in most cases users should avoid making use of it.
427+
428+:c:func:`memcached_prepend()` places a segment of data before the last piece
429+of data stored. Currently expiration and key are not used in the server.
430+
431+:c:func:`memcached_append()` places a segment of data at the end of the last
432+piece of data stored. Currently expiration and key are not used in the server.
433+
434+:c:func:`memcached_prepend_by_key()` and
435+:c:func:`memcached_append_by_key_by_key()` methods both behave in a similar
436+method as the non key methods. The difference is that they use their
437+group_key parameter to map objects to particular servers.
438+
439+If you are looking for performance, :c:func:`memcached_set()` with non-blocking
440+IO is the fastest way to store data on the server.
441+
442+All of the above functions are testsed with the
443+:c:type:`MEMCACHED_BEHAVIOR_USE_UDP` behavior enabled. However, when using
444+these operations with this behavior on, there are limits to the size of the
445+payload being sent to the server. The reason for these limits is that the
446+Memcached Server does not allow multi-datagram requests
447 and the current server implementation sets a datagram size to 1400 bytes. Due
448 to protocol overhead, the actual limit of the user supplied data is less than
449 1400 bytes and depends on the protocol in use as, well as the operation being
450-executed. When running with the binary protocol, \ `` MEMCACHED_BEHAVIOR_BINARY_PROTOCOL``\ ,
451-the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
452-When running with the ASCII protocol, the exact limit fluctuates depending on
453-which function is being executed and whether the function is a cas operation
454-or not. For non-cas ASCII set operations, there are at least 1335 bytes available
455-to split among the key, key_prefix, and value; for cas ASCII operations there are
456-at least 1318 bytes available to split among the key, key_prefix and value. If the
457-total size of the command, including overhead, exceeds 1400 bytes, a \ ``MEMCACHED_WRITE_FAILURE``\
458-will be returned.
459+executed. When running with the binary protocol,
460+:c:type:`MEMCACHED_BEHAVIOR_BINARY_PROTOCOL`, the size of the key,value,
461+flags and expiry combined may not exceed 1368 bytes. When running with the
462+ASCII protocol, the exact limit fluctuates depending on which function is
463+being executed and whether the function is a cas operation or not. For
464+non-cas ASCII set operations, there are at least 1335 bytes available
465+to split among the key, key_prefix, and value; for cas ASCII operations
466+there are at least 1318 bytes available to split among the key, key_prefix
467+and value. If the total size of the command, including overhead, exceeds
468+1400 bytes, a :c:type:`MEMCACHED_WRITE_FAILURE` will be returned.
469
470
471 ------
472@@ -74,9 +79,10 @@
473 ------
474
475
476-All methods return a value of type \ ``memcached_return_t``\ .
477-On success the value will be \ ``MEMCACHED_SUCCESS``\ .
478-Use memcached_strerror() to translate this value to a printable string.
479+All methods return a value of type :c:type:`memcached_return_t`.
480+On success the value will be :c:type:`MEMCACHED_SUCCESS`.
481+Use :c:func:`memcached_strerror()` to translate this value to a printable
482+string.
483
484
485 ----
486@@ -93,5 +99,5 @@
487 --------
488
489
490-memcached(1) libmemached(3) memcached_strerror(3) memcached_set(3) memcached_add(3) memcached_cas(3) memcached_replace(3)
491+:manpage:`memcached(1)` :manpage:`libmemached(3)` :manpage:`memcached_strerror(3)` :manpage:`memcached_set(3)` :manpage:`memcached_add(3)` :manpage:`memcached_cas(3)` :manpage:`memcached_replace(3)`
492

Subscribers

People subscribed via source and target branches

to all changes: