From 11aab3bf93f8f762ed0f4ad39574859d9753b610 Mon Sep 17 00:00:00 2001 From: proller Date: Thu, 31 Oct 2024 17:15:49 +0100 Subject: [PATCH] Move profile log events (#2360) #1733 Move cloud/filestore/libs/storage/tablet/profile_log_events.h -> cloud/filestore/libs/storage/tablet/model/profile_log_events.h for reduce deps size in tools --- .../libs/storage/tablet/{ => model}/profile_log_events.cpp | 0 .../libs/storage/tablet/{ => model}/profile_log_events.h | 0 .../libs/storage/tablet/{ => model}/profile_log_events_ut.cpp | 0 cloud/filestore/libs/storage/tablet/model/ut/ya.make | 1 + cloud/filestore/libs/storage/tablet/model/ya.make | 2 ++ cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp | 3 +-- cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp | 2 +- .../libs/storage/tablet/tablet_actor_collectgarbage.cpp | 3 +-- .../libs/storage/tablet/tablet_actor_deletegarbage.cpp | 2 +- cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp | 3 +-- .../libs/storage/tablet/tablet_actor_flush_bytes.cpp | 3 +-- cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp | 4 ++-- cloud/filestore/libs/storage/tablet/tablet_actor_truncate.cpp | 3 +-- .../filestore/libs/storage/tablet/tablet_actor_writeblob.cpp | 2 +- .../filestore/libs/storage/tablet/tablet_actor_zerorange.cpp | 2 +- cloud/filestore/libs/storage/tablet/tablet_state_data.cpp | 3 +-- cloud/filestore/libs/storage/tablet/tablet_tx.h | 2 +- cloud/filestore/libs/storage/tablet/ut/ya.make | 1 - cloud/filestore/libs/storage/tablet/ya.make | 1 - cloud/filestore/tools/analytics/libs/event-log/dump.cpp | 2 +- cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp | 2 +- .../tools/analytics/libs/event-log/request_filter.cpp | 2 +- .../tools/analytics/libs/event-log/request_filter_ut.cpp | 2 +- .../tools/analytics/libs/event-log/request_printer.cpp | 2 +- .../tools/analytics/libs/event-log/request_printer_ut.cpp | 2 +- cloud/filestore/tools/analytics/libs/event-log/ya.make | 3 ++- cloud/filestore/tools/analytics/profile_tool/README.md | 2 +- .../tools/analytics/profile_tool/lib/dump_events.cpp | 2 +- .../tools/analytics/profile_tool/lib/find_bytes_access.cpp | 2 +- cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp | 2 +- 30 files changed, 28 insertions(+), 32 deletions(-) rename cloud/filestore/libs/storage/tablet/{ => model}/profile_log_events.cpp (100%) rename cloud/filestore/libs/storage/tablet/{ => model}/profile_log_events.h (100%) rename cloud/filestore/libs/storage/tablet/{ => model}/profile_log_events_ut.cpp (100%) diff --git a/cloud/filestore/libs/storage/tablet/profile_log_events.cpp b/cloud/filestore/libs/storage/tablet/model/profile_log_events.cpp similarity index 100% rename from cloud/filestore/libs/storage/tablet/profile_log_events.cpp rename to cloud/filestore/libs/storage/tablet/model/profile_log_events.cpp diff --git a/cloud/filestore/libs/storage/tablet/profile_log_events.h b/cloud/filestore/libs/storage/tablet/model/profile_log_events.h similarity index 100% rename from cloud/filestore/libs/storage/tablet/profile_log_events.h rename to cloud/filestore/libs/storage/tablet/model/profile_log_events.h diff --git a/cloud/filestore/libs/storage/tablet/profile_log_events_ut.cpp b/cloud/filestore/libs/storage/tablet/model/profile_log_events_ut.cpp similarity index 100% rename from cloud/filestore/libs/storage/tablet/profile_log_events_ut.cpp rename to cloud/filestore/libs/storage/tablet/model/profile_log_events_ut.cpp diff --git a/cloud/filestore/libs/storage/tablet/model/ut/ya.make b/cloud/filestore/libs/storage/tablet/model/ut/ya.make index f9bbc1cee6f..630adf47232 100644 --- a/cloud/filestore/libs/storage/tablet/model/ut/ya.make +++ b/cloud/filestore/libs/storage/tablet/model/ut/ya.make @@ -15,6 +15,7 @@ SRCS( node_index_cache_ut.cpp node_session_stat_ut.cpp operation_ut.cpp + profile_log_events_ut.cpp range_locks_ut.cpp read_ahead_ut.cpp sparse_segment_ut.cpp diff --git a/cloud/filestore/libs/storage/tablet/model/ya.make b/cloud/filestore/libs/storage/tablet/model/ya.make index 67933d17d5c..f485d81d62b 100644 --- a/cloud/filestore/libs/storage/tablet/model/ya.make +++ b/cloud/filestore/libs/storage/tablet/model/ya.make @@ -28,6 +28,7 @@ SRCS( node_index_cache.cpp node_session_stat.cpp operation.cpp + profile_log_events.cpp range_locks.cpp read_ahead.cpp sparse_segment.cpp @@ -38,6 +39,7 @@ SRCS( ) PEERDIR( + cloud/filestore/libs/diagnostics/events cloud/filestore/libs/storage/api cloud/filestore/libs/storage/model cloud/filestore/private/api/protos diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp index c8ac90c8d6e..4a804b9efce 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp @@ -1,9 +1,8 @@ #include "tablet_actor.h" -#include "profile_log_events.h" - #include #include +#include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp index 617668a84cb..1208f4aa837 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp @@ -1,6 +1,6 @@ #include "tablet_actor.h" -#include "profile_log_events.h" +#include namespace NCloud::NFileStore::NStorage { diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_collectgarbage.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_collectgarbage.cpp index 10758b60cbe..31042525c6e 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_collectgarbage.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_collectgarbage.cpp @@ -1,8 +1,7 @@ #include "tablet_actor.h" -#include "profile_log_events.h" - #include +#include #include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_deletegarbage.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_deletegarbage.cpp index e174fabbaef..5858e3d28ac 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_deletegarbage.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_deletegarbage.cpp @@ -1,6 +1,6 @@ #include "tablet_actor.h" -#include "profile_log_events.h" +#include namespace NCloud::NFileStore::NStorage { diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp index eb944d10892..7ac50a0b02a 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp @@ -1,8 +1,7 @@ #include "tablet_actor.h" -#include "profile_log_events.h" - #include +#include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_flush_bytes.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_flush_bytes.cpp index 6a76fb92f46..1f7c88f53d6 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_flush_bytes.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_flush_bytes.cpp @@ -1,9 +1,8 @@ #include "tablet_actor.h" -#include "profile_log_events.h" - #include #include +#include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp index 69af5ad8cea..3c40c0b135c 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp @@ -1,10 +1,10 @@ #include "tablet_actor.h" #include "helpers.h" -#include "profile_log_events.h" -#include +#include +#include #include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_truncate.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_truncate.cpp index f19b44227f4..fffc91d2462 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_truncate.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_truncate.cpp @@ -1,8 +1,7 @@ #include "tablet_actor.h" -#include "profile_log_events.h" - #include +#include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_writeblob.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_writeblob.cpp index 70d1d327535..3cf6bcf9d48 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_writeblob.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_writeblob.cpp @@ -1,9 +1,9 @@ #include "tablet_actor.h" #include "helpers.h" -#include "profile_log_events.h" #include +#include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_actor_zerorange.cpp b/cloud/filestore/libs/storage/tablet/tablet_actor_zerorange.cpp index 6574e32caf2..b16bdc8ca3a 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_actor_zerorange.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_actor_zerorange.cpp @@ -1,6 +1,6 @@ #include "tablet_actor.h" -#include "profile_log_events.h" +#include namespace NCloud::NFileStore::NStorage { diff --git a/cloud/filestore/libs/storage/tablet/tablet_state_data.cpp b/cloud/filestore/libs/storage/tablet/tablet_state_data.cpp index b0f071936aa..d5d56fd1c6e 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_state_data.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_state_data.cpp @@ -1,9 +1,8 @@ #include "tablet_state_impl.h" -#include "profile_log_events.h" - #include #include +#include #include #include diff --git a/cloud/filestore/libs/storage/tablet/tablet_tx.h b/cloud/filestore/libs/storage/tablet/tablet_tx.h index d2ea165987c..4b1aafc1534 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_tx.h +++ b/cloud/filestore/libs/storage/tablet/tablet_tx.h @@ -2,7 +2,6 @@ #include "public.h" -#include "profile_log_events.h" #include "tablet_database.h" #include "tablet_private.h" #include "tablet_state_cache.h" @@ -15,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/cloud/filestore/libs/storage/tablet/ut/ya.make b/cloud/filestore/libs/storage/tablet/ut/ya.make index 096987fc41a..3c6bd746f26 100644 --- a/cloud/filestore/libs/storage/tablet/ut/ya.make +++ b/cloud/filestore/libs/storage/tablet/ut/ya.make @@ -4,7 +4,6 @@ INCLUDE(${ARCADIA_ROOT}/cloud/filestore/tests/recipes/medium.inc) SRCS( helpers_ut.cpp - profile_log_events_ut.cpp rebase_logic_ut.cpp subsessions_ut.cpp tablet_database_ut.cpp diff --git a/cloud/filestore/libs/storage/tablet/ya.make b/cloud/filestore/libs/storage/tablet/ya.make index a18b629ecd2..4c89969c4ce 100644 --- a/cloud/filestore/libs/storage/tablet/ya.make +++ b/cloud/filestore/libs/storage/tablet/ya.make @@ -6,7 +6,6 @@ GENERATE_ENUM_SERIALIZATION(session.h) SRCS( checkpoint.cpp helpers.cpp - profile_log_events.cpp rebase_logic.cpp session.cpp shard_request_actor.cpp diff --git a/cloud/filestore/tools/analytics/libs/event-log/dump.cpp b/cloud/filestore/tools/analytics/libs/event-log/dump.cpp index 20bcabad55e..4d82708f5ea 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/dump.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/dump.cpp @@ -4,8 +4,8 @@ #include #include -#include #include +#include #include diff --git a/cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp b/cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp index 4150891ff56..06a808ff335 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include diff --git a/cloud/filestore/tools/analytics/libs/event-log/request_filter.cpp b/cloud/filestore/tools/analytics/libs/event-log/request_filter.cpp index 621f684ce9f..1eeb61f33f2 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/request_filter.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/request_filter.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace NCloud::NFileStore { diff --git a/cloud/filestore/tools/analytics/libs/event-log/request_filter_ut.cpp b/cloud/filestore/tools/analytics/libs/event-log/request_filter_ut.cpp index fa509c38dd9..13a31340a30 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/request_filter_ut.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/request_filter_ut.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/cloud/filestore/tools/analytics/libs/event-log/request_printer.cpp b/cloud/filestore/tools/analytics/libs/event-log/request_printer.cpp index 34598cbc32a..38fa442c055 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/request_printer.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/request_printer.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/cloud/filestore/tools/analytics/libs/event-log/request_printer_ut.cpp b/cloud/filestore/tools/analytics/libs/event-log/request_printer_ut.cpp index 93e28f3e16e..51961e0742e 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/request_printer_ut.cpp +++ b/cloud/filestore/tools/analytics/libs/event-log/request_printer_ut.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include diff --git a/cloud/filestore/tools/analytics/libs/event-log/ya.make b/cloud/filestore/tools/analytics/libs/event-log/ya.make index a17c884e477..f9a9b3648eb 100644 --- a/cloud/filestore/tools/analytics/libs/event-log/ya.make +++ b/cloud/filestore/tools/analytics/libs/event-log/ya.make @@ -7,10 +7,11 @@ SRCS( ) PEERDIR( + cloud/filestore/libs/diagnostics cloud/filestore/libs/diagnostics/events cloud/filestore/libs/service cloud/filestore/libs/storage/model - cloud/filestore/libs/storage/tablet + cloud/filestore/libs/storage/tablet/model cloud/storage/core/libs/common ) diff --git a/cloud/filestore/tools/analytics/profile_tool/README.md b/cloud/filestore/tools/analytics/profile_tool/README.md index cf46e3b003f..e14a3c1c196 100644 --- a/cloud/filestore/tools/analytics/profile_tool/README.md +++ b/cloud/filestore/tools/analytics/profile_tool/README.md @@ -6,7 +6,7 @@ Profile log fills in three places: * On client-side (vhost) [public API](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/service/request.h) requests are partially filled [on request forwarding](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/service/service_actor_forward.cpp) in service actor and [on request completion](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/service/service_actor_complete.cpp). It will be dumped to profile-log [on in-flight request completion](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/service/service_state.cpp). Only significant requests with filled additional fields will be dumped. This profile log can be found in ```/var/log/nfs/vhost-server.log``` on hosts. -* In tablet [private API](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/profile_log_events.h) requests are filled in several places. You can try to grep ```InitProfileLogRequestInfo``` and ```FinalizeProfileLogRequestInfo``` in ```cloud/filestore/libs/storage/tablet/*``` and find all the places. This profile log will be dumped to ```/var/log/nfs/nfs-profile.log``` on nfs-control svms. +* In tablet [private API](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/model/profile_log_events.h) requests are filled in several places. You can try to grep ```InitProfileLogRequestInfo``` and ```FinalizeProfileLogRequestInfo``` in ```cloud/filestore/libs/storage/tablet/*``` and find all the places. This profile log will be dumped to ```/var/log/nfs/nfs-profile.log``` on nfs-control svms. ## Common options diff --git a/cloud/filestore/tools/analytics/profile_tool/lib/dump_events.cpp b/cloud/filestore/tools/analytics/profile_tool/lib/dump_events.cpp index 3cffc68381c..c847bbfb629 100644 --- a/cloud/filestore/tools/analytics/profile_tool/lib/dump_events.cpp +++ b/cloud/filestore/tools/analytics/profile_tool/lib/dump_events.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/cloud/filestore/tools/analytics/profile_tool/lib/find_bytes_access.cpp b/cloud/filestore/tools/analytics/profile_tool/lib/find_bytes_access.cpp index d9ded51b672..40324f7bf0c 100644 --- a/cloud/filestore/tools/analytics/profile_tool/lib/find_bytes_access.cpp +++ b/cloud/filestore/tools/analytics/profile_tool/lib/find_bytes_access.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp b/cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp index 680adee3a48..21617064a6a 100644 --- a/cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp +++ b/cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp @@ -4,7 +4,7 @@ #include "command.h" -#include +#include #include #include #include