1 // Copyright 2017 Google Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_BENCHMARKS_CONSTANTS_H 16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_BENCHMARKS_CONSTANTS_H 17 18 #include <cinttypes> 19 20 namespace google { 21 namespace cloud { 22 namespace bigtable { 23 /// Supporting classes and functions to implement benchmarks. 24 namespace benchmarks { 25 26 //@{ 27 /** 28 * @name Test constants. 29 * 30 * Most of these were requirements in the original bugs (#189, #196). 31 */ 32 /// The size of the table. 33 std::int64_t constexpr kDefaultTableSize = 10000000L; 34 35 /// The name of the column family used in the benchmark. 36 constexpr char kColumnFamily[] = "cf"; 37 38 /// The number of fields (aka columns, aka column qualifiers) in each row. 39 int constexpr kNumFields = 10; 40 41 /// The size of each value. 42 int constexpr kFieldSize = 100; 43 44 /// The size of each BulkApply request. 45 std::int64_t constexpr kBulkSize = 1000; 46 47 /// The number of threads running the latency test. 48 int constexpr kDefaultThreads = 8; 49 50 /// How long does the test last by default. 51 int constexpr kDefaultTestDuration = 30; 52 53 /// How many shards are used to populate the table. 54 int constexpr kPopulateShardCount = 10; 55 56 /// How many times each PopulateTable shard reports progress. 57 int constexpr kPopulateShardProgressMarks = 4; 58 59 /// How many random bytes in the table id. 60 int constexpr kTableIdRandomLetters = 8; 61 //@} 62 63 } // namespace benchmarks 64 } // namespace bigtable 65 } // namespace cloud 66 } // namespace google 67 68 #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_BENCHMARKS_CONSTANTS_H 69