Skip to content

Commit

Permalink
Move profile log events (#2360)
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
proller authored Oct 31, 2024
1 parent 943affa commit 11aab3b
Show file tree
Hide file tree
Showing 30 changed files with 28 additions and 32 deletions.
1 change: 1 addition & 0 deletions cloud/filestore/libs/storage/tablet/model/ut/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cloud/filestore/libs/storage/tablet/model/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions cloud/filestore/libs/storage/tablet/tablet_actor_addblob.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include "tablet_actor.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/diagnostics/critical_events.h>
#include <cloud/filestore/libs/storage/tablet/model/group_by.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <util/generic/set.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "tablet_actor.h"

#include "profile_log_events.h"
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

namespace NCloud::NFileStore::NStorage {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "tablet_actor.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/diagnostics/critical_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <cloud/storage/core/libs/tablet/blob_id.h>
#include <cloud/storage/core/libs/tablet/gc_logic.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "tablet_actor.h"

#include "profile_log_events.h"
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>

namespace NCloud::NFileStore::NStorage {

Expand Down
3 changes: 1 addition & 2 deletions cloud/filestore/libs/storage/tablet/tablet_actor_flush.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "tablet_actor.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/storage/tablet/model/blob_builder.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <contrib/ydb/library/actors/core/actor_bootstrapped.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include "tablet_actor.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/storage/model/block_buffer.h>
#include <cloud/filestore/libs/storage/tablet/model/blob_builder.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <contrib/ydb/library/actors/core/actor_bootstrapped.h>

Expand Down
4 changes: 2 additions & 2 deletions cloud/filestore/libs/storage/tablet/tablet_actor_readblob.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "tablet_actor.h"

#include "helpers.h"
#include "profile_log_events.h"

#include <contrib/ydb/core/base/blobstorage.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <contrib/ydb/core/base/blobstorage.h>
#include <contrib/ydb/library/actors/core/actor_bootstrapped.h>

#include <util/stream/str.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "tablet_actor.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/storage/tablet/model/group_by.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <util/generic/set.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "tablet_actor.h"

#include "helpers.h"
#include "profile_log_events.h"

#include <cloud/filestore/libs/diagnostics/critical_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <contrib/ydb/core/base/blobstorage.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "tablet_actor.h"

#include "profile_log_events.h"
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>

namespace NCloud::NFileStore::NStorage {

Expand Down
3 changes: 1 addition & 2 deletions cloud/filestore/libs/storage/tablet/tablet_state_data.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include "tablet_state_impl.h"

#include "profile_log_events.h"

#include <cloud/filestore/libs/storage/model/utils.h>
#include <cloud/filestore/libs/storage/tablet/model/block.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/split_range.h>

#include <util/generic/guid.h>
Expand Down
2 changes: 1 addition & 1 deletion cloud/filestore/libs/storage/tablet/tablet_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -15,6 +14,7 @@
#include <cloud/filestore/libs/storage/model/public.h>
#include <cloud/filestore/libs/storage/model/range.h>
#include <cloud/filestore/libs/storage/tablet/model/block.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/range_locks.h>
#include <cloud/filestore/libs/storage/tablet/protos/tablet.pb.h>

Expand Down
1 change: 0 additions & 1 deletion cloud/filestore/libs/storage/tablet/ut/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion cloud/filestore/libs/storage/tablet/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cloud/filestore/tools/analytics/libs/event-log/dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <cloud/storage/core/libs/common/error.h>

Expand Down
2 changes: 1 addition & 1 deletion cloud/filestore/tools/analytics/libs/event-log/dump_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <library/cpp/testing/unittest/registar.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/model/range.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

namespace NCloud::NFileStore {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <library/cpp/testing/unittest/registar.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/public/api/protos/locks.pb.h>

#include <cloud/storage/core/libs/tablet/model/partial_blob_id.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/diagnostics/profile_log_events.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>

#include <library/cpp/testing/unittest/registar.h>

Expand Down
3 changes: 2 additions & 1 deletion cloud/filestore/tools/analytics/libs/event-log/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion cloud/filestore/tools/analytics/profile_tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/tools/analytics/libs/event-log/dump.h>
#include <cloud/filestore/tools/analytics/libs/event-log/request_filter.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <cloud/filestore/libs/diagnostics/events/profile_events.ev.pb.h>
#include <cloud/filestore/libs/service/request.h>
#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/tools/analytics/libs/event-log/dump.h>
#include <cloud/filestore/tools/analytics/libs/event-log/request_filter.h>

Expand Down
2 changes: 1 addition & 1 deletion cloud/filestore/tools/analytics/profile_tool/lib/mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "command.h"

#include <cloud/filestore/libs/storage/tablet/profile_log_events.h>
#include <cloud/filestore/libs/storage/tablet/model/profile_log_events.h>
#include <cloud/filestore/tools/analytics/libs/event-log/dump.h>
#include <cloud/filestore/tools/analytics/libs/event-log/request_filter.h>
#include <cloud/filestore/tools/analytics/profile_tool/lib/common_filter_params.h>
Expand Down

0 comments on commit 11aab3b

Please sign in to comment.