diff --git a/src/graph/util/ScopedTimer.h b/src/common/time/ScopedTimer.h similarity index 92% rename from src/graph/util/ScopedTimer.h rename to src/common/time/ScopedTimer.h index 61b27f6e1df..e6ce05eaba9 100644 --- a/src/graph/util/ScopedTimer.h +++ b/src/common/time/ScopedTimer.h @@ -4,8 +4,7 @@ * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ -#ifndef GRAPH_UTIL_SCOPEDTIMER_H_ -#define GRAPH_UTIL_SCOPEDTIMER_H_ +#pragma once #include @@ -52,5 +51,3 @@ class ScopedTimer final { #define CONCAT_IMPL(x, y) x##y #define MACRO_CONCAT(x, y) CONCAT_IMPL(x, y) #define SCOPED_TIMER(v) ::nebula::ScopedTimer MACRO_CONCAT(_SCOPED_TIMER_, __LINE__)(v) - -#endif // GRAPH_UTIL_SCOPEDTIMER_H_ diff --git a/src/common/time/test/CMakeLists.txt b/src/common/time/test/CMakeLists.txt index 36cf1ed429d..5d9d2036d3d 100644 --- a/src/common/time/test/CMakeLists.txt +++ b/src/common/time/test/CMakeLists.txt @@ -8,6 +8,7 @@ nebula_add_test( duration_test SOURCES DurationTest.cpp + ScopedTimerTest.cpp OBJECTS $ $ diff --git a/src/graph/util/test/ScopedTimerTest.cpp b/src/common/time/test/ScopedTimerTest.cpp similarity index 95% rename from src/graph/util/test/ScopedTimerTest.cpp rename to src/common/time/test/ScopedTimerTest.cpp index 9a8307f5731..dd7e873b490 100644 --- a/src/graph/util/test/ScopedTimerTest.cpp +++ b/src/common/time/test/ScopedTimerTest.cpp @@ -6,7 +6,7 @@ #include -#include "graph/util/ScopedTimer.h" +#include "common/time/ScopedTimer.h" namespace nebula { diff --git a/src/graph/executor/Executor.cpp b/src/graph/executor/Executor.cpp index 3ed9d88017a..ea4eac46e1a 100644 --- a/src/graph/executor/Executor.cpp +++ b/src/graph/executor/Executor.cpp @@ -13,6 +13,7 @@ #include "common/base/ObjectPool.h" #include "common/memory/MemoryUtils.h" +#include "common/time/ScopedTimer.h" #include "graph/context/ExecutionContext.h" #include "graph/context/QueryContext.h" #include "graph/executor/ExecutionError.h" @@ -97,7 +98,6 @@ #include "graph/planner/plan/PlanNode.h" #include "graph/planner/plan/Query.h" #include "graph/service/GraphFlags.h" -#include "graph/util/ScopedTimer.h" #include "interface/gen-cpp2/graph_types.h" using folly::stringPrintf; diff --git a/src/graph/executor/Executor.h b/src/graph/executor/Executor.h index 7c253d67605..1ae94e61948 100644 --- a/src/graph/executor/Executor.h +++ b/src/graph/executor/Executor.h @@ -17,8 +17,8 @@ #include "common/cpp/helpers.h" #include "common/datatypes/Value.h" #include "common/time/Duration.h" +#include "common/time/ScopedTimer.h" #include "graph/context/ExecutionContext.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/CharsetExecutor.cpp b/src/graph/executor/admin/CharsetExecutor.cpp index 874dbc203fd..aeca7d7e7af 100644 --- a/src/graph/executor/admin/CharsetExecutor.cpp +++ b/src/graph/executor/admin/CharsetExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/admin/CharsetExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/ConfigExecutor.cpp b/src/graph/executor/admin/ConfigExecutor.cpp index aa402439f62..4175ed92dfd 100644 --- a/src/graph/executor/admin/ConfigExecutor.cpp +++ b/src/graph/executor/admin/ConfigExecutor.cpp @@ -9,10 +9,10 @@ #include #include "common/conf/Configuration.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/GroupExecutor.cpp b/src/graph/executor/admin/GroupExecutor.cpp index 37187c1fa61..83747641fbd 100644 --- a/src/graph/executor/admin/GroupExecutor.cpp +++ b/src/graph/executor/admin/GroupExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/admin/GroupExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/PartExecutor.cpp b/src/graph/executor/admin/PartExecutor.cpp index 0b2eb37fa5e..a6d63ee924d 100644 --- a/src/graph/executor/admin/PartExecutor.cpp +++ b/src/graph/executor/admin/PartExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/admin/PartExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" using nebula::network::NetworkUtils; diff --git a/src/graph/executor/admin/ShowHostsExecutor.cpp b/src/graph/executor/admin/ShowHostsExecutor.cpp index 74f0aa005fe..db5133b8de9 100644 --- a/src/graph/executor/admin/ShowHostsExecutor.cpp +++ b/src/graph/executor/admin/ShowHostsExecutor.cpp @@ -8,9 +8,9 @@ #include +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/ShowMetaLeaderExecutor.cpp b/src/graph/executor/admin/ShowMetaLeaderExecutor.cpp index 4674fe43f4c..0b6d5604509 100644 --- a/src/graph/executor/admin/ShowMetaLeaderExecutor.cpp +++ b/src/graph/executor/admin/ShowMetaLeaderExecutor.cpp @@ -8,10 +8,10 @@ #include +#include "common/time/ScopedTimer.h" #include "common/time/TimeUtils.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/ShowQueriesExecutor.cpp b/src/graph/executor/admin/ShowQueriesExecutor.cpp index 19b0aacca55..4c9e64dbcf6 100644 --- a/src/graph/executor/admin/ShowQueriesExecutor.cpp +++ b/src/graph/executor/admin/ShowQueriesExecutor.cpp @@ -8,10 +8,10 @@ #include +#include "common/time/ScopedTimer.h" #include "common/time/TimeUtils.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/ShowStatsExecutor.cpp b/src/graph/executor/admin/ShowStatsExecutor.cpp index 7821194bba6..d1658675d73 100644 --- a/src/graph/executor/admin/ShowStatsExecutor.cpp +++ b/src/graph/executor/admin/ShowStatsExecutor.cpp @@ -6,11 +6,11 @@ #include "graph/executor/admin/ShowStatsExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" #include "graph/service/PermissionManager.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/SnapshotExecutor.cpp b/src/graph/executor/admin/SnapshotExecutor.cpp index 18bcdfdeddf..1f70ffd9515 100644 --- a/src/graph/executor/admin/SnapshotExecutor.cpp +++ b/src/graph/executor/admin/SnapshotExecutor.cpp @@ -8,9 +8,9 @@ #include +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/SpaceExecutor.cpp b/src/graph/executor/admin/SpaceExecutor.cpp index 59d03ed1699..52d4f46e3a2 100644 --- a/src/graph/executor/admin/SpaceExecutor.cpp +++ b/src/graph/executor/admin/SpaceExecutor.cpp @@ -6,12 +6,12 @@ #include "graph/executor/admin/SpaceExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" #include "graph/service/PermissionManager.h" #include "graph/util/FTIndexUtils.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/SubmitJobExecutor.cpp b/src/graph/executor/admin/SubmitJobExecutor.cpp index 592acdc0f0f..9fb3d651153 100644 --- a/src/graph/executor/admin/SubmitJobExecutor.cpp +++ b/src/graph/executor/admin/SubmitJobExecutor.cpp @@ -8,10 +8,10 @@ #include +#include "common/time/ScopedTimer.h" #include "common/time/TimeUtils.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/admin/SwitchSpaceExecutor.cpp b/src/graph/executor/admin/SwitchSpaceExecutor.cpp index 8f2e9d9817f..6679c3ddfbf 100644 --- a/src/graph/executor/admin/SwitchSpaceExecutor.cpp +++ b/src/graph/executor/admin/SwitchSpaceExecutor.cpp @@ -7,10 +7,10 @@ #include "graph/executor/admin/SwitchSpaceExecutor.h" #include "clients/meta/MetaClient.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Query.h" #include "graph/service/PermissionManager.h" -#include "graph/util/ScopedTimer.h" #include "interface/gen-cpp2/meta_types.h" namespace nebula { diff --git a/src/graph/executor/admin/ZoneExecutor.cpp b/src/graph/executor/admin/ZoneExecutor.cpp index acf13a8eba9..e5d89e1bdde 100644 --- a/src/graph/executor/admin/ZoneExecutor.cpp +++ b/src/graph/executor/admin/ZoneExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/admin/ZoneExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Admin.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/logic/LoopExecutor.cpp b/src/graph/executor/logic/LoopExecutor.cpp index ae04213341a..cbbd5ab392e 100644 --- a/src/graph/executor/logic/LoopExecutor.cpp +++ b/src/graph/executor/logic/LoopExecutor.cpp @@ -8,10 +8,10 @@ #include +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Logic.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" #include "interface/gen-cpp2/common_types.h" using folly::stringPrintf; diff --git a/src/graph/executor/logic/PassThroughExecutor.cpp b/src/graph/executor/logic/PassThroughExecutor.cpp index 5e68cbf8052..c9b24075d39 100644 --- a/src/graph/executor/logic/PassThroughExecutor.cpp +++ b/src/graph/executor/logic/PassThroughExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/logic/PassThroughExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/logic/SelectExecutor.cpp b/src/graph/executor/logic/SelectExecutor.cpp index 4c4ed03abb7..c809f5fcd8b 100644 --- a/src/graph/executor/logic/SelectExecutor.cpp +++ b/src/graph/executor/logic/SelectExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/logic/SelectExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Logic.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/logic/StartExecutor.cpp b/src/graph/executor/logic/StartExecutor.cpp index 4020ae771a9..58a79d4f0e1 100644 --- a/src/graph/executor/logic/StartExecutor.cpp +++ b/src/graph/executor/logic/StartExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/logic/StartExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/PlanNode.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/maintain/EdgeExecutor.cpp b/src/graph/executor/maintain/EdgeExecutor.cpp index a169edc0455..b61ff5cebb7 100644 --- a/src/graph/executor/maintain/EdgeExecutor.cpp +++ b/src/graph/executor/maintain/EdgeExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/maintain/EdgeExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Maintain.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/maintain/TagExecutor.cpp b/src/graph/executor/maintain/TagExecutor.cpp index af4ead79a77..590219bc768 100644 --- a/src/graph/executor/maintain/TagExecutor.cpp +++ b/src/graph/executor/maintain/TagExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/maintain/TagExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Maintain.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/mutate/DeleteExecutor.cpp b/src/graph/executor/mutate/DeleteExecutor.cpp index 8587e69d1b1..9a6ba86a4fc 100644 --- a/src/graph/executor/mutate/DeleteExecutor.cpp +++ b/src/graph/executor/mutate/DeleteExecutor.cpp @@ -6,11 +6,11 @@ #include "DeleteExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/executor/mutate/DeleteExecutor.h" #include "graph/planner/plan/Mutate.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; diff --git a/src/graph/executor/mutate/InsertExecutor.cpp b/src/graph/executor/mutate/InsertExecutor.cpp index ef5b3cc25a1..1eb5ce5118c 100644 --- a/src/graph/executor/mutate/InsertExecutor.cpp +++ b/src/graph/executor/mutate/InsertExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/mutate/InsertExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Mutate.h" #include "graph/service/GraphFlags.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; diff --git a/src/graph/executor/mutate/UpdateExecutor.cpp b/src/graph/executor/mutate/UpdateExecutor.cpp index 141f4b9e709..f6f9ed0bd15 100644 --- a/src/graph/executor/mutate/UpdateExecutor.cpp +++ b/src/graph/executor/mutate/UpdateExecutor.cpp @@ -6,11 +6,11 @@ #include "UpdateExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Mutate.h" #include "graph/service/GraphFlags.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; diff --git a/src/graph/executor/query/AggregateExecutor.cpp b/src/graph/executor/query/AggregateExecutor.cpp index cf9be4fadce..3d019bb609b 100644 --- a/src/graph/executor/query/AggregateExecutor.cpp +++ b/src/graph/executor/query/AggregateExecutor.cpp @@ -8,11 +8,11 @@ #include "common/datatypes/List.h" #include "common/expression/AggregateExpression.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/context/Result.h" #include "graph/planner/plan/PlanNode.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/DataCollectExecutor.cpp b/src/graph/executor/query/DataCollectExecutor.cpp index c0ecd5926b7..fae86f144fd 100644 --- a/src/graph/executor/query/DataCollectExecutor.cpp +++ b/src/graph/executor/query/DataCollectExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/DataCollectExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/DedupExecutor.cpp b/src/graph/executor/query/DedupExecutor.cpp index 8a7d213a244..d45d8b95f18 100644 --- a/src/graph/executor/query/DedupExecutor.cpp +++ b/src/graph/executor/query/DedupExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/DedupExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/FilterExecutor.cpp b/src/graph/executor/query/FilterExecutor.cpp index 79e296aeb02..a2cf91a0df7 100644 --- a/src/graph/executor/query/FilterExecutor.cpp +++ b/src/graph/executor/query/FilterExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/FilterExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/GetEdgesExecutor.cpp b/src/graph/executor/query/GetEdgesExecutor.cpp index 23717370b6e..7165392a970 100644 --- a/src/graph/executor/query/GetEdgesExecutor.cpp +++ b/src/graph/executor/query/GetEdgesExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/query/GetEdgesExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/planner/plan/Query.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; using nebula::storage::StorageRpcResponse; diff --git a/src/graph/executor/query/GetNeighborsExecutor.cpp b/src/graph/executor/query/GetNeighborsExecutor.cpp index e8eb09ca2c4..f04918959c4 100644 --- a/src/graph/executor/query/GetNeighborsExecutor.cpp +++ b/src/graph/executor/query/GetNeighborsExecutor.cpp @@ -11,9 +11,9 @@ #include "clients/storage/GraphStorageClient.h" #include "common/datatypes/List.h" #include "common/datatypes/Vertex.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/service/GraphFlags.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; using nebula::storage::StorageRpcResponse; diff --git a/src/graph/executor/query/GetVerticesExecutor.cpp b/src/graph/executor/query/GetVerticesExecutor.cpp index 0a23083cb2c..81932a22295 100644 --- a/src/graph/executor/query/GetVerticesExecutor.cpp +++ b/src/graph/executor/query/GetVerticesExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/GetVerticesExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryContext.h" #include "graph/util/SchemaUtil.h" -#include "graph/util/ScopedTimer.h" using nebula::storage::GraphStorageClient; using nebula::storage::StorageRpcResponse; diff --git a/src/graph/executor/query/InnerJoinExecutor.cpp b/src/graph/executor/query/InnerJoinExecutor.cpp index f13de9cac6a..03edd177ea4 100644 --- a/src/graph/executor/query/InnerJoinExecutor.cpp +++ b/src/graph/executor/query/InnerJoinExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/query/InnerJoinExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/Iterator.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/IntersectExecutor.cpp b/src/graph/executor/query/IntersectExecutor.cpp index 34471ca2f02..596fd20a96c 100644 --- a/src/graph/executor/query/IntersectExecutor.cpp +++ b/src/graph/executor/query/IntersectExecutor.cpp @@ -8,9 +8,9 @@ #include +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/PlanNode.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/LeftJoinExecutor.cpp b/src/graph/executor/query/LeftJoinExecutor.cpp index 516569f27bc..d024fda6fcf 100644 --- a/src/graph/executor/query/LeftJoinExecutor.cpp +++ b/src/graph/executor/query/LeftJoinExecutor.cpp @@ -6,10 +6,10 @@ #include "graph/executor/query/LeftJoinExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/Iterator.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/LimitExecutor.cpp b/src/graph/executor/query/LimitExecutor.cpp index e3591eb1409..eeeb74672c5 100644 --- a/src/graph/executor/query/LimitExecutor.cpp +++ b/src/graph/executor/query/LimitExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/LimitExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/MinusExecutor.cpp b/src/graph/executor/query/MinusExecutor.cpp index 483dcb7d8d9..9c5777324ff 100644 --- a/src/graph/executor/query/MinusExecutor.cpp +++ b/src/graph/executor/query/MinusExecutor.cpp @@ -8,8 +8,8 @@ #include +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/ProjectExecutor.cpp b/src/graph/executor/query/ProjectExecutor.cpp index c2c04b13bda..cd9ece6f746 100644 --- a/src/graph/executor/query/ProjectExecutor.cpp +++ b/src/graph/executor/query/ProjectExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/ProjectExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" #include "parser/Clauses.h" namespace nebula { diff --git a/src/graph/executor/query/SampleExecutor.cpp b/src/graph/executor/query/SampleExecutor.cpp index 3f13ed68e74..e50311f52e1 100644 --- a/src/graph/executor/query/SampleExecutor.cpp +++ b/src/graph/executor/query/SampleExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/SampleExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/SortExecutor.cpp b/src/graph/executor/query/SortExecutor.cpp index 88b6e8ac233..b24bfb87e6c 100644 --- a/src/graph/executor/query/SortExecutor.cpp +++ b/src/graph/executor/query/SortExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/SortExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/TopNExecutor.cpp b/src/graph/executor/query/TopNExecutor.cpp index af09aa6fada..ca3c3dc798e 100644 --- a/src/graph/executor/query/TopNExecutor.cpp +++ b/src/graph/executor/query/TopNExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/TopNExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/UnionAllVersionVarExecutor.cpp b/src/graph/executor/query/UnionAllVersionVarExecutor.cpp index fb885ccd44e..011be2fc250 100644 --- a/src/graph/executor/query/UnionAllVersionVarExecutor.cpp +++ b/src/graph/executor/query/UnionAllVersionVarExecutor.cpp @@ -6,8 +6,8 @@ #include "graph/executor/query/UnionAllVersionVarExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/UnionExecutor.cpp b/src/graph/executor/query/UnionExecutor.cpp index 68d8d465725..206c8933cbd 100644 --- a/src/graph/executor/query/UnionExecutor.cpp +++ b/src/graph/executor/query/UnionExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/UnionExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/ExecutionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" namespace nebula { namespace graph { diff --git a/src/graph/executor/query/UnwindExecutor.cpp b/src/graph/executor/query/UnwindExecutor.cpp index 8841c957b1a..0182457aaff 100644 --- a/src/graph/executor/query/UnwindExecutor.cpp +++ b/src/graph/executor/query/UnwindExecutor.cpp @@ -6,9 +6,9 @@ #include "graph/executor/query/UnwindExecutor.h" +#include "common/time/ScopedTimer.h" #include "graph/context/QueryExpressionContext.h" #include "graph/planner/plan/Query.h" -#include "graph/util/ScopedTimer.h" #include "parser/Clauses.h" namespace nebula { diff --git a/src/graph/service/QueryEngine.cpp b/src/graph/service/QueryEngine.cpp index 6ed6628a6d7..a23d269c43c 100644 --- a/src/graph/service/QueryEngine.cpp +++ b/src/graph/service/QueryEngine.cpp @@ -71,7 +71,8 @@ Status QueryEngine::setupMemoryMonitorThread() { // Just to test whether to get the right memory info NG_RETURN_IF_ERROR(updateMemoryWatermark()); - memoryMonitorThread_->addRepeatTask(FLAGS_check_memory_interval_in_secs, updateMemoryWatermark); + auto ms = FLAGS_check_memory_interval_in_secs * 1000; + memoryMonitorThread_->addRepeatTask(ms, updateMemoryWatermark); return Status::OK(); } diff --git a/src/graph/service/QueryInstance.cpp b/src/graph/service/QueryInstance.cpp index 4ccda317a11..0872f1021bf 100644 --- a/src/graph/service/QueryInstance.cpp +++ b/src/graph/service/QueryInstance.cpp @@ -7,6 +7,7 @@ #include "graph/service/QueryInstance.h" #include "common/base/Base.h" +#include "common/time/ScopedTimer.h" #include "graph/executor/ExecutionError.h" #include "graph/executor/Executor.h" #include "graph/optimizer/OptRule.h" @@ -16,7 +17,6 @@ #include "graph/scheduler/Scheduler.h" #include "graph/stats/StatsDef.h" #include "graph/util/AstUtils.h" -#include "graph/util/ScopedTimer.h" #include "graph/validator/Validator.h" #include "parser/ExplainSentence.h" diff --git a/src/graph/util/test/CMakeLists.txt b/src/graph/util/test/CMakeLists.txt index c0d01f77833..afdbc51cc46 100644 --- a/src/graph/util/test/CMakeLists.txt +++ b/src/graph/util/test/CMakeLists.txt @@ -3,7 +3,6 @@ nebula_add_test( SOURCES ExpressionUtilsTest.cpp IdGeneratorTest.cpp - ScopedTimerTest.cpp OBJECTS $ $ diff --git a/src/graph/validator/BalanceValidator.cpp b/src/graph/validator/BalanceValidator.cpp index f2603f6133d..34e63acb16f 100644 --- a/src/graph/validator/BalanceValidator.cpp +++ b/src/graph/validator/BalanceValidator.cpp @@ -5,6 +5,7 @@ */ #include "graph/validator/BalanceValidator.h" + #include "graph/planner/plan/Admin.h" namespace nebula { diff --git a/src/graph/validator/IngestValidator.cpp b/src/graph/validator/IngestValidator.cpp index f8fec9d27ed..fb6d9226a39 100644 --- a/src/graph/validator/IngestValidator.cpp +++ b/src/graph/validator/IngestValidator.cpp @@ -5,6 +5,7 @@ */ #include "graph/validator/IngestValidator.h" + #include "graph/planner/plan/Admin.h" namespace nebula {