Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cc7075f

Browse files
committedApr 19, 2020
Clang format
1 parent 18696a4 commit cc7075f

File tree

2 files changed

+14
-20
lines changed

2 files changed

+14
-20
lines changed
 

‎benchmark/main.cpp

+13-19
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
1+
#include <chrono>
12
#include <csv2/reader.hpp>
23
#include <iostream>
3-
#include <chrono>
44
using namespace csv2;
55

66
int main(int argc, char **argv) {
77

88
auto print_exec_time = [](auto start, auto stop) {
9-
auto duration_us =
10-
std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
11-
auto duration_ms =
12-
std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
13-
auto duration_s =
14-
std::chrono::duration_cast<std::chrono::seconds>(stop - start);
15-
16-
std::cout << duration_us.count() << " us | "
17-
<< duration_ms.count() << " ms | "
18-
<< duration_s.count() << " s\n";
19-
};
9+
auto duration_us = std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
10+
auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
11+
auto duration_s = std::chrono::duration_cast<std::chrono::seconds>(stop - start);
12+
13+
std::cout << duration_us.count() << " us | " << duration_ms.count() << " ms | "
14+
<< duration_s.count() << " s\n";
15+
};
2016

2117
auto start = std::chrono::high_resolution_clock::now();
22-
18+
2319
Reader csv{
24-
option::Filename{std::string(argv[1])},
25-
option::Delimiter{','},
26-
option::SkipInitialSpace{true},
27-
option::TrimCharacters{std::vector<char>{'\n', '\r'}},
28-
option::TrimPolicy{Trim::trailing}
29-
// ...
20+
option::Filename{std::string(argv[1])}, option::Delimiter{','},
21+
option::SkipInitialSpace{true}, option::TrimCharacters{std::vector<char>{'\n', '\r'}},
22+
option::TrimPolicy{Trim::trailing}
23+
// ...
3024
};
3125

3226
auto stop = std::chrono::high_resolution_clock::now();

‎clang-format.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
2-
find ./include -type f \( -iname \*.cpp -o -iname \*.hpp \) | xargs clang-format -style=file -i
2+
find ./include ./benchmark -type f \( -iname \*.cpp -o -iname \*.hpp \) | xargs clang-format -style=file -i
33
find ./test -type f \( -iname \*.cpp \) | xargs clang-format -style=file -i

0 commit comments

Comments
 (0)
Please sign in to comment.