mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Doing bulkd writes instead of individual writes now.
Also slight change to Writer API, going back to how the rotate methods were before.
This commit is contained in:
parent
a428645b2a
commit
4f0fc571ef
9 changed files with 155 additions and 67 deletions
|
@ -34,6 +34,7 @@ public:
|
|||
void Write(int num_fields, Value** vals);
|
||||
void SetBuf(bool enabled);
|
||||
void Flush();
|
||||
void FlushWriteBuffer();
|
||||
void Rotate(string rotated_path, double open, double close, bool terminating);
|
||||
void Finish();
|
||||
|
||||
|
@ -49,18 +50,22 @@ public:
|
|||
protected:
|
||||
friend class Manager;
|
||||
|
||||
|
||||
WriterBackend* backend;
|
||||
bool disabled;
|
||||
bool initialized;
|
||||
bool buf;
|
||||
|
||||
string path;
|
||||
int num_fields;
|
||||
const Field* const * fields;
|
||||
|
||||
// Buffer for bulk writes.
|
||||
static const int WRITER_BUFFER_SIZE = 50;
|
||||
|
||||
int write_buffer_pos;
|
||||
Value*** write_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue