1syntax = "proto2"; 2 3package dittosuiteproto; 4 5enum Order { 6 SEQUENTIAL = 0; 7 RANDOM = 1; 8} 9 10enum Reseeding { 11 ONCE = 0; 12 EACH_ROUND_OF_CYCLES = 1; 13 EACH_CYCLE = 2; 14} 15 16enum AccessMode { 17 READ_ONLY = 1; 18 WRITE_ONLY = 2; 19 READ_WRITE = 3; 20} 21 22message OpenFile { 23 oneof file { 24 string path_name = 1; 25 string input = 2; 26 } 27 optional string output_fd = 3; 28 optional bool create = 4 [default = true]; 29 optional bool direct_io = 5 [default = false]; 30 optional AccessMode access_mode = 6 [default = READ_WRITE]; 31} 32 33message DeleteFile { 34 oneof file { 35 string path_name = 1; 36 string input = 2; 37 } 38} 39 40message CloseFile { 41 required string input_fd = 1; 42} 43 44message ResizeFile { 45 required string input_fd = 1; 46 required int64 size = 2; 47} 48 49message ResizeFileRandom { 50 required string input_fd = 1; 51 required int64 min = 2; 52 required int64 max = 3; 53 optional uint32 seed = 4; 54 optional Reseeding reseeding = 5 [default = ONCE]; 55} 56 57message WriteFile { 58 required string input_fd = 1; 59 optional int64 size = 2 [default = -1]; 60 optional int64 block_size = 3 [default = 4096]; 61 optional int64 starting_offset = 4 [default = 0]; 62 optional Order access_order = 5 [default = SEQUENTIAL]; 63 optional uint32 seed = 6; 64 optional bool fsync = 7 [default = false]; 65 optional Reseeding reseeding = 8 [default = ONCE]; 66} 67 68message ReadFile { 69 enum ReadFAdvise { 70 AUTOMATIC = 0; 71 NORMAL = 1; 72 SEQUENTIAL = 2; 73 RANDOM = 3; 74 } 75 required string input_fd = 1; 76 optional int64 size = 2 [default = -1]; 77 optional int64 block_size = 3 [default = 4096]; 78 optional int64 starting_offset = 4 [default = 0]; 79 optional Order access_order = 5 [default = SEQUENTIAL]; 80 optional uint32 seed = 6; 81 optional ReadFAdvise fadvise = 7 [default = AUTOMATIC]; 82 optional Reseeding reseeding = 8 [default = ONCE]; 83} 84 85message ReadDirectory { 86 required string directory_name = 1; 87 required string output = 2; 88} 89 90message Thread { 91 required Instruction instruction = 1; 92 optional int32 spawn = 2 [default = 1]; 93} 94 95message Multithreading { 96 repeated Thread threads = 1; 97} 98 99message InvalidateCache {} 100 101message Instruction { 102 optional int32 repeat = 1 [default = 1]; 103 oneof instruction_oneof { 104 InstructionSet instruction_set = 2; 105 OpenFile open_file = 3; 106 DeleteFile delete_file = 4; 107 CloseFile close_file = 5; 108 ResizeFile resize_file = 6; 109 WriteFile write_file = 7; 110 ReadFile read_file = 8; 111 ReadDirectory read_directory = 9; 112 ResizeFileRandom resize_file_random = 10; 113 Multithreading multithreading = 11; 114 InvalidateCache invalidate_cache = 12; 115 } 116} 117 118message InstructionSet { 119 repeated Instruction instructions = 1; 120 optional InstructionSetIterate iterate_options = 2; 121} 122 123message InstructionSetIterate { 124 required string list_name = 1; 125 required string item_name = 2; 126 optional Order access_order = 3 [default = SEQUENTIAL]; 127 optional Reseeding reseeding = 4 [default = ONCE]; 128 optional uint32 seed = 5; 129} 130 131message Global { 132 optional string absolute_path = 1 [default = ""]; 133} 134 135message Benchmark { 136 optional Instruction init = 1; 137 required Instruction main = 2; 138 optional Instruction clean_up = 3; 139 required Global global = 4; 140} 141