7fee8775a4
Summary: Allow EventLogger to directly log from a JSONWriter. This allows the JSONWriter to be shared by EventLogger and potentially EventListener, which is an important step to integrate EventLogger and EventListener. This patch also rewrites EventLoggerHelpers::LogTableFileCreation(), which uses the new API to generate identical log. Test Plan: Run db_bench in debug mode and make sure the log is correct and no assertions fail. Reviewers: sdong, anthony, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D38709
20 lines
746 B
C++
20 lines
746 B
C++
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
#pragma once
|
|
|
|
#include "util/event_logger.h"
|
|
#include "rocksdb/table_properties.h"
|
|
|
|
namespace rocksdb {
|
|
|
|
class EventLoggerHelpers {
|
|
public:
|
|
static void AppendCurrentTime(JSONWriter* json_writer);
|
|
static void LogTableFileCreation(EventLogger* event_logger, int job_id,
|
|
uint64_t file_number, uint64_t file_size,
|
|
const TableProperties& table_properties);
|
|
};
|
|
} // namespace rocksdb
|