This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <condition_variable> | |
| #include <thread> | |
| #include "boost/thread/condition_variable.hpp" | |
| #include "boost/thread/thread.hpp" | |
| template<typename Thread, typename Lock, typename CondVar> | |
| void Loop() { | |
| for (int i = 0; i < 10000; ++i) { | |
| CondVar condition_variable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) | |
| project(Test) | |
| # Create main.cpp which uses gmock | |
| file(WRITE src/main.cpp "#include \"gmock/gmock.h\"\n\n") | |
| file(APPEND src/main.cpp "struct A {\n virtual void Do() {}\n};\n\n") | |
| file(APPEND src/main.cpp "struct MockA : public A {\n MOCK_METHOD0(Do, void());\n};\n\n") | |
| file(APPEND src/main.cpp "TEST(A, Do) {\n") | |
| file(APPEND src/main.cpp " MockA mock_a;\n") | |
| file(APPEND src/main.cpp " EXPECT_CALL(mock_a, Do()).Times(testing::AtLeast(1));\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <memory> | |
| #include <string> | |
| #include "boost/optional.hpp" | |
| int main() { | |
| std::unique_ptr<std::string> ptr(new std::string("A")); | |
| boost::optional<std::string> opt_empty; | |
| boost::optional<std::string> opt_full("A"); | |
| std::cout << "ptr: " << sizeof(ptr) << '\n'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <chrono> | |
| #include <future> | |
| #include <iostream> | |
| #include <string> | |
| #include <thread> | |
| void DoStuff() { | |
| std::cout << "Starting task.\n"; | |
| std::this_thread::sleep_for(std::chrono::seconds(2)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.0) | |
| project(x) | |
| file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/include/fonts.hpp" | |
| "#include <iostream>\ninline int Print() { std::cout << \"Running.\\n\"; return 0; }\n") | |
| file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp" | |
| "#include \"fonts.hpp\"\nint main() { return Print(); }\n") | |
| add_library(Fonts INTERFACE) | |
| target_include_directories(Fonts INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| template <typename Child> | |
| struct Routing | |
| { | |
| Routing() = delete; | |
| explicit Routing(std::string s) : t(s) {} | |
| void Get() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Fraser@FRASER-HOME /e/Test | |
| $ git clone git@github.com:maidsafe/MaidSafe | |
| Cloning into 'MaidSafe'... | |
| remote: Counting objects: 64668, done. | |
| remote: Compressing objects: 100% (9/9), done. | |
| remote: Total 64668 (delta 2), reused 0 (delta 0), pack-reused 64659 | |
| Receiving objects: 100% (64668/64668), 98.76 MiB | 5.93 MiB/s, done. | |
| Resolving deltas: 100% (34142/34142), done. | |
| Checking connectivity... done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| include(ExternalProject) | |
| # Set default ExternalProject root directory | |
| set_directory_properties(PROPERTIES EP_PREFIX "${CMAKE_BINARY_DIR}/Third Party") | |
| set(InstallPath "${CMAKE_BINARY_DIR}/Installed Dependencies") | |
| # Add DocOpt | |
| ExternalProject_Add( | |
| DocOpt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tps/transfer_to_existing_account_multiple_execs/3 | |
| time: [299.34 ms 300.82 ms 304.37 ms] | |
| thrpt: [9.8563 elem/s 9.9726 elem/s 10.022 elem/s] | |
| change: | |
| time: [+97.665% +101.15% +105.00%] (p = 0.00 < 0.05) | |
| thrpt: [-51.218% -50.285% -49.409%] | |
| Performance has regressed. | |
| Benchmarking tps/transfer_to_existing_account_multiple_deploys_per_exec/3: Warming up for 3.0000 s | |
| Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 15.9s or reduce sample count to 10 | |
| tps/transfer_to_existing_account_multiple_deploys_per_exec/3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tps/transfer_to_existing_account_multiple_execs/3/false | |
| time: [4.1253 ms 4.1331 ms 4.1398 ms] | |
| thrpt: [724.67 elem/s 725.85 elem/s 727.22 elem/s] | |
| change: | |
| time: [-18.142% -17.929% -17.739%] (p = 0.00 < 0.05) | |
| thrpt: [+21.564% +21.846% +22.162%] | |
| Performance has improved. | |
| tps/transfer_to_existing_account_multiple_deploys_per_exec/3/false | |
| time: [4.4451 ms 4.5028 ms 4.5329 ms] | |
| thrpt: [661.83 elem/s 666.25 elem/s 674.91 elem/s] |
OlderNewer