clang-format
This commit is contained in:
		@@ -3,10 +3,6 @@
 | 
				
			|||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
 | 
					// Distributed under the MIT License (http://opensource.org/licenses/MIT)
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// latency.cpp : spdlog latency benchmarks
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "benchmark/benchmark.h"
 | 
					#include "benchmark/benchmark.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "spdlog/spdlog.h"
 | 
					#include "spdlog/spdlog.h"
 | 
				
			||||||
@@ -31,10 +27,7 @@ void bench_scoped_pad(benchmark::State &state, size_t wrapped_size, spdlog::deta
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int main(int argc, char *argv[])
 | 
					int main(int argc, char *argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					 | 
				
			||||||
    using spdlog::details::padding_info;
 | 
					    using spdlog::details::padding_info;
 | 
				
			||||||
    spdlog::set_pattern("[tid %t] %v");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<size_t> sizes = {0, 2, 4, 8, 16, 32, 64, 128};
 | 
					    std::vector<size_t> sizes = {0, 2, 4, 8, 16, 32, 64, 128};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (auto size : sizes)
 | 
					    for (auto size : sizes)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -181,22 +181,16 @@ TEST_CASE("center_padded_short", "[pattern_formatter]")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
TEST_CASE("left_padded_huge", "[pattern_formatter]")
 | 
					TEST_CASE("left_padded_huge", "[pattern_formatter]")
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUIRE(log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester                                                                                                                  ]"
 | 
					    REQUIRE(
 | 
				
			||||||
 | 
					        log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") ==
 | 
				
			||||||
 | 
					        "[pattern_tester                                                                                                                  ]"
 | 
				
			||||||
        " Some message\n");
 | 
					        " Some message\n");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TEST_CASE("left_padded_max", "[pattern_formatter]")
 | 
					TEST_CASE("left_padded_max", "[pattern_formatter]")
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUIRE(log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester                                                                                                                  ]"
 | 
					    REQUIRE(
 | 
				
			||||||
 | 
					        log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") ==
 | 
				
			||||||
 | 
					        "[pattern_tester                                                                                                                  ]"
 | 
				
			||||||
        " Some message\n");
 | 
					        " Some message\n");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//TEST_CASE("right_padded_huge", "[pattern_formatter]")
 | 
					 | 
				
			||||||
//{
 | 
					 | 
				
			||||||
//    REQUIRE(log_to_str("Some message", "[%-3n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester] Some message\n");
 | 
					 | 
				
			||||||
//}
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//TEST_CASE("center_padded_huge", "[pattern_formatter]")
 | 
					 | 
				
			||||||
//{
 | 
					 | 
				
			||||||
//    REQUIRE(log_to_str("Some message", "[%=3n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester] Some message\n");
 | 
					 | 
				
			||||||
//}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user