Mercurial > hg > orthanc-databases
comparison Framework/Plugins/IndexBackend.cpp @ 452:6780dd8b0a66 pg-transactions
fix latency measure for ODBC
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 18 Jan 2024 10:04:43 +0100 |
parents | 5881e4af5799 |
children | f0976163dbe1 |
comparison
equal
deleted
inserted
replaced
451:392ac133a491 | 452:6780dd8b0a66 |
---|---|
2882 // execute 11x the simplest statement and return the median value | 2882 // execute 11x the simplest statement and return the median value |
2883 std::vector<uint64_t> measures; | 2883 std::vector<uint64_t> measures; |
2884 | 2884 |
2885 for (int i = 0; i < 11; i++) | 2885 for (int i = 0; i < 11; i++) |
2886 { | 2886 { |
2887 DatabaseManager::CachedStatement statement( | 2887 DatabaseManager::StandaloneStatement statement(manager, "SELECT 1"); |
2888 STATEMENT_FROM_HERE, manager, | |
2889 "SELECT 1"); | |
2890 | 2888 |
2891 Orthanc::Toolbox::ElapsedTimer timer; | 2889 Orthanc::Toolbox::ElapsedTimer timer; |
2892 | 2890 |
2893 statement.Execute(); | 2891 statement.ExecuteWithoutResult(); |
2894 | 2892 |
2895 measures.push_back(timer.GetElapsedMicroseconds()); | 2893 measures.push_back(timer.GetElapsedMicroseconds()); |
2896 } | 2894 } |
2897 | 2895 |
2898 std::sort(measures.begin(), measures.end()); | 2896 std::sort(measures.begin(), measures.end()); |