MCPcopy Create free account
hub / github.com/boostorg/filesystem / cpp_main

Function cpp_main

test/path_times.cpp:70–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68//--------------------------------------------------------------------------------------//
69
70int cpp_main(int argc, char* argv[])
71{
72 if (argc != 2)
73 {
74 cout << "Usage: path_times <cycles-in-millions>\n";
75 return 1;
76 }
77
78 max_cycles = std::atoi(argv[1]) * 1000000LL;
79 cout << "testing " << std::atoi(argv[1]) << " million cycles" << endl;
80
81 cout << "time_loop" << endl;
82 nanosecond_type x = time_loop();
83
84 cout << "time_ctor with string" << endl;
85 nanosecond_type s = time_ctor(std::string("/foo/bar/baz"));
86
87 cout << "time_ctor with wstring" << endl;
88 nanosecond_type w = time_ctor(std::wstring(L"/foo/bar/baz"));
89
90 if (s > w)
91 cout << "narrow/wide CPU-time ratio = " << long double(s) / w << endl;
92 else
93 cout << "wide/narrow CPU-time ratio = " << long double(w) / s << endl;
94
95 cout << "returning from main()" << endl;
96 return 0;
97}

Callers

nothing calls this directly

Calls 3

time_loopFunction · 0.85
time_ctorFunction · 0.85
stringFunction · 0.85

Tested by

no test coverage detected