CommonFormatter - make it streamable » History » Version 1
Jessica Mack, 05/28/2015 05:29 PM
1 | 1 | Jessica Mack | h1. CommonFormatter - make it streamable |
---|---|---|---|
2 | 1 | Jessica Mack | |
3 | 1 | Jessica Mack | h3. Task Name: |
4 | 1 | Jessica Mack | |
5 | 1 | Jessica Mack | make Formatter streamable |
6 | 1 | Jessica Mack | |
7 | 1 | Jessica Mack | h3. Size: |
8 | 1 | Jessica Mack | |
9 | 1 | Jessica Mack | S |
10 | 1 | Jessica Mack | |
11 | 1 | Jessica Mack | h3. Skill: |
12 | 1 | Jessica Mack | |
13 | 1 | Jessica Mack | intermediate |
14 | 1 | Jessica Mack | |
15 | 1 | Jessica Mack | h3. Mentor(s): |
16 | 1 | Jessica Mack | |
17 | 1 | Jessica Mack | Sage Weil sage@inktank.com |
18 | 1 | Jessica Mack | |
19 | 1 | Jessica Mack | h3. Components: |
20 | 1 | Jessica Mack | |
21 | 1 | Jessica Mack | common/Formatter |
22 | 1 | Jessica Mack | optionally adjust users |
23 | 1 | Jessica Mack | |
24 | 1 | Jessica Mack | h3. Description: |
25 | 1 | Jessica Mack | |
26 | 1 | Jessica Mack | The current Formatter interface accumulates everything in an in-memory buffer (or buffers, even), which makes it unusable in cases where we are dumping/formatter large amounts of memory (e.g., a significant portion of the allocate memory). We should make an alternative interface that lets you specify an ostream for the Formatter and emits output as it goes (instead of appending to the buffer). |
27 | 1 | Jessica Mack | |
28 | 1 | Jessica Mack | h3. External Documentation: |
29 | 1 | Jessica Mack | |
30 | 1 | Jessica Mack | Edit section |
31 | 1 | Jessica Mack | http://stackoverflow.com/questions/524641/how-do-i-create-my-own-ostream-streambuf |
32 | 1 | Jessica Mack | |
33 | 1 | Jessica Mack | there is also an ostream stream_buf in tree; see https://github.com/ceph/ceph/blob/master/src/common/PrebufferedStreambuf.h |