fixup! Reformat source code

This commit is contained in:
Xiaoge Su 2021-09-13 16:57:27 -07:00 committed by Jingyu Zhou
parent abf73047ca
commit e68b131e4a
6 changed files with 14 additions and 19 deletions

View File

@ -4234,11 +4234,11 @@ int main(int argc, char* argv[]) {
#ifdef ALLOC_INSTRUMENTATION
{
std::cout << "Page Counts: " << FastAllocator<16>::pageCount << " " << FastAllocator<32>::pageCount << " "
<< FastAllocator<64>::pageCount << " " << FastAllocator<128>::pageCount << " "
<< FastAllocator<256>::pageCount << " " << FastAllocator<512>::pageCount << " "
<< FastAllocator<1024>::pageCount << " " << FastAllocator<2048>::pageCount << " "
<< FastAllocator<4096>::pageCount << " " << FastAllocator<8192>::pageCount << " "
<< FastAllocator<16384>::pageCount << std::endl;
<< FastAllocator<64>::pageCount << " " << FastAllocator<128>::pageCount << " "
<< FastAllocator<256>::pageCount << " " << FastAllocator<512>::pageCount << " "
<< FastAllocator<1024>::pageCount << " " << FastAllocator<2048>::pageCount << " "
<< FastAllocator<4096>::pageCount << " " << FastAllocator<8192>::pageCount << " "
<< FastAllocator<16384>::pageCount << std::endl;
std::vector<std::pair<std::string, const char*>> typeNames;
for (auto i = allocInstr.begin(); i != allocInstr.end(); ++i) {

View File

@ -22,8 +22,6 @@
#include <vector>
#include "flow/actorcompiler.h"
inline void throw_operation_failed() {
throw operation_failed();
}

View File

@ -41,8 +41,6 @@
#include "fdbrpc/TSSComparison.h"
#include "flow/actorcompiler.h" // This must be the last #include.
ACTOR Future<Void> allAlternativesFailedDelay(Future<Void> okFuture);
struct ModelHolder : NonCopyable, public ReferenceCounted<ModelHolder> {

View File

@ -27,8 +27,6 @@
#include "flow/BooleanParam.h"
#include "flow/flow.h"
FDB_DECLARE_BOOLEAN_PARAM(Averaged);
struct PerfMetric {
@ -76,7 +74,9 @@ private:
struct PerfDoubleCounter {
PerfDoubleCounter(std::string name) : name(name), value(0) {}
PerfDoubleCounter(std::string name, std::vector<PerfDoubleCounter*>& v) : name(name), value(0) { v.push_back(this); }
PerfDoubleCounter(std::string name, std::vector<PerfDoubleCounter*>& v) : name(name), value(0) {
v.push_back(this);
}
void operator+=(double delta) { value += delta; }
void operator++() { value += 1.0; }
PerfMetric getMetric() const { return PerfMetric(name, value, Averaged::False); }

View File

@ -2518,9 +2518,9 @@ bool acceptDirectory(FILE_ATTRIBUTE_DATA fileAttributes, std::string const& name
}
ACTOR Future<std::vector<std::string>> findFiles(std::string directory,
std::string extension,
bool directoryOnly,
bool async) {
std::string extension,
bool directoryOnly,
bool async) {
INJECT_FAULT(platform_error, "findFiles"); // findFiles failed (Win32)
state std::vector<std::string> result;
state int64_t tsc_begin = timestampCounter();
@ -2575,9 +2575,9 @@ bool acceptDirectory(FILE_ATTRIBUTE_DATA fileAttributes, std::string const& name
}
ACTOR Future<std::vector<std::string>> findFiles(std::string directory,
std::string extension,
bool directoryOnly,
bool async) {
std::string extension,
bool directoryOnly,
bool async) {
INJECT_FAULT(platform_error, "findFiles"); // findFiles failed
state std::vector<std::string> result;
state int64_t tsc_begin = timestampCounter();

View File

@ -37,7 +37,6 @@
#include "flow/actorcompiler.h" // This must be the last #include.
//
namespace platform {
// e.g. extension==".fdb", returns filenames relative to directory
Future<std::vector<std::string>> listFilesAsync(std::string const& directory, std::string const& extension = "");