MCPcopy Create free account
hub / github.com/arvidn/libtorrent / main

Function main

tools/checking_benchmark.cpp:174–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174int main(int argc, char const* argv[]) try
175{
176 std::string save_path = ".";
177 if (argc > 1)
178 save_path = argv[1];
179
180#if TORRENT_HAVE_MMAP || TORRENT_HAVE_MAP_VIEW_OF_FILE
181 run_test(save_path, lt::create_torrent::v1_only, lt::mmap_disk_io_constructor);
182 std::cout << "v1-only, mmap disk I/O\n\n";
183 run_test(save_path, lt::create_torrent::v2_only, lt::mmap_disk_io_constructor);
184 std::cout << "v2-only, mmap disk I/O\n\n";
185 run_test(save_path, {}, lt::mmap_disk_io_constructor);
186 std::cout << "hybrid, mmap disk I/O\n\n";
187#endif
188 run_test(save_path, lt::create_torrent::v1_only, lt::posix_disk_io_constructor);
189 std::cout << "v1-only, posix disk I/O\n\n";
190 run_test(save_path, lt::create_torrent::v2_only, lt::posix_disk_io_constructor);
191 std::cout << "v2-only, posix disk I/O\n\n";
192 run_test(save_path, {}, lt::posix_disk_io_constructor);
193 std::cout << "hybrid, posix disk I/O\n\n";
194}
195catch (lt::system_error const& e)
196{
197 std::cerr << "Failed: " << e.code().message() << '\n';
198}

Callers

nothing calls this directly

Calls 2

run_testFunction · 0.70
messageMethod · 0.45

Tested by

no test coverage detected