int sys = i % 4;
int l = 5 + (i%4);
if (subs.should_gather(sys, l)) {
- Entry *e = new Entry(ceph_clock_now(),
- pthread_self(),
- l,
- sys,
- "hello world");
+ Entry *e = log.create_entry(l, sys, "hello world");
log.submit_entry(e);
}
}
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l))
- log.submit_entry(new Entry(ceph_clock_now(), pthread_self(), l, 1));
+ log.submit_entry(log.create_entry(l, 1));
}
log.flush();
log.stop();
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l))
- log.submit_entry(new Entry(ceph_clock_now(), pthread_self(), l, 1,
- "this is a long string asdf asdf asdf asdf asdf asdf asd fasd fasdf "));
+ log.submit_entry(log.create_entry(l, 1,
+ "this is a long string asdf asdf asdf asdf asdf asdf asd fasd fasdf "));
}
log.flush();
log.stop();
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l)) {
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), l, 1);
+ Entry *e = log.create_entry(l, 1);
ostringstream oss;
oss << "this i a long stream asdf asdf asdf asdf asdf asdf asdf asdf asdf as fd";
e->set_str(oss.str());
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l)) {
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), l, 1);
+ Entry *e = log.create_entry(l, 1);
ostringstream oss;
oss.str().reserve(80);
oss << "this i a long stream asdf asdf asdf asdf asdf asdf asdf asdf asdf as fd";
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l)) {
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), l, 1);
+ Entry *e = log.create_entry(l, 1);
PrebufferedStreambuf psb(e->m_static_buf, sizeof(e->m_static_buf));
ostream oss(&psb);
oss << "this i a long stream asdf asdf asdf asdf asdf asdf asdf asdf asdf as fd";
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l)) {
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), l, 1);
+ Entry *e = log.create_entry(l, 1);
PrebufferedStreambuf psb(e->m_static_buf, sizeof(e->m_static_buf));
ostream oss(&psb);
oss << "this i a long stream asdf asdf asdf asdf asdf asdf asdf asdf asdf as fd"
for (int i=0; i<many; i++) {
int l = 10;
if (subs.should_gather(1, l))
- log.submit_entry(new Entry(ceph_clock_now(), pthread_self(), l, 1));
+ log.submit_entry(log.create_entry(l, 1));
}
log.flush();
log.stop();
log.reopen_log_file();
log.inject_segv();
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), 10, 1);
+ Entry *e = log.create_entry(10, 1);
{
PrCtl unset_dumpable;
log.submit_entry(e); // this should segv
log.set_log_file("/tmp/big");
log.reopen_log_file();
int l = 10;
- Entry *e = new Entry(ceph_clock_now(), pthread_self(), l, 1);
+ Entry *e = log.create_entry(l, 1);
std::string msg(10000000, 0);
e->set_str(msg);