blob: 42cdd4ac19b8dfb233da54ca5ceb6537abeb15d9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "../zen.h"
namespace zen {
class RpcStartRecordingCommand : public CacheStoreCommand
{
public:
RpcStartRecordingCommand();
~RpcStartRecordingCommand();
virtual int Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) override;
virtual cxxopts::Options& Options() override { return m_Options; }
private:
cxxopts::Options m_Options{"rpc-record-start", "Starts recording of cache rpc requests on a host"};
std::string m_HostName;
std::string m_RecordingPath;
};
class RpcStopRecordingCommand : public CacheStoreCommand
{
public:
RpcStopRecordingCommand();
~RpcStopRecordingCommand();
virtual int Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) override;
virtual cxxopts::Options& Options() override { return m_Options; }
private:
cxxopts::Options m_Options{"rpc-record-stop", "Stops recording of cache rpc requests on a host"};
std::string m_HostName;
};
class RpcReplayCommand : public CacheStoreCommand
{
public:
RpcReplayCommand();
~RpcReplayCommand();
virtual int Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) override;
virtual cxxopts::Options& Options() override { return m_Options; }
private:
cxxopts::Options m_Options{"rpc-record-replay", "Replays a previously recorded session of cache rpc requests to a target host"};
std::string m_HostName;
std::string m_RecordingPath;
bool m_OnHost = false;
bool m_ShowMethodStats = false;
int m_ProcessCount = 1;
int m_ThreadCount = 0;
uint64_t m_Offset = 0;
uint64_t m_Stride = 1;
bool m_ForceAllowLocalRefs = false;
bool m_DisableLocalRefs = false;
bool m_ForceAllowLocalHandleRef = false;
bool m_DisableLocalHandleRefs = false;
bool m_ForceAllowPartialLocalRefs = false;
bool m_DisablePartialLocalRefs = false;
bool m_DryRun = false;
};
} // namespace zen
|