Project

General

Profile

CommonFormatter - make it streamable » History » Version 1

Version 1/2 - Next » - Current version
Jessica Mack, 05/28/2015 05:29 PM


CommonFormatter - make it streamable

Task Name:

make Formatter streamable

Size:

S

Skill:

intermediate

Mentor(s):

Sage Weil

Components:

common/Formatter
optionally adjust users

Description:

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).

External Documentation:

Edit section
http://stackoverflow.com/questions/524641/how-do-i-create-my-own-ostream-streambuf

there is also an ostream stream_buf in tree; see https://github.com/ceph/ceph/blob/master/src/common/PrebufferedStreambuf.h