From ad3e040b317f6e96b3e9ca3ef3934475ec63b870 Mon Sep 17 00:00:00 2001 From: wunder957 Date: Sat, 16 Sep 2023 22:44:33 +0800 Subject: [PATCH] Change tracers module (#64) --- docs/source/tracers/clone.rst | 2 +- docs/source/tracers/openat2.rst | 2 +- docs/source/tracers/tcpconnect.rst | 2 +- docs/source/tracers/uname.rst | 2 +- duetector/tracers/bcc/__init__.py | 0 duetector/tracers/{ => bcc}/clone.py | 0 duetector/tracers/{ => bcc}/openat2.py | 0 duetector/tracers/{ => bcc}/tcpconnect.py | 0 duetector/tracers/register.py | 3 ++- duetector/tracers/sh/__init__.py | 0 duetector/tracers/{ => sh}/uname.py | 0 11 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 duetector/tracers/bcc/__init__.py rename duetector/tracers/{ => bcc}/clone.py (100%) rename duetector/tracers/{ => bcc}/openat2.py (100%) rename duetector/tracers/{ => bcc}/tcpconnect.py (100%) create mode 100644 duetector/tracers/sh/__init__.py rename duetector/tracers/{ => sh}/uname.py (100%) diff --git a/docs/source/tracers/clone.rst b/docs/source/tracers/clone.rst index 317456d..967e4ff 100644 --- a/docs/source/tracers/clone.rst +++ b/docs/source/tracers/clone.rst @@ -1,7 +1,7 @@ CloneTracer ================================== -.. autoclass:: duetector.tracers.clone.CloneTracer +.. autoclass:: duetector.tracers.bcc.clone.CloneTracer :members: :undoc-members: :private-members: diff --git a/docs/source/tracers/openat2.rst b/docs/source/tracers/openat2.rst index 8e5cd7f..915bbf5 100644 --- a/docs/source/tracers/openat2.rst +++ b/docs/source/tracers/openat2.rst @@ -1,7 +1,7 @@ OpenTracer ================================== -.. autoclass:: duetector.tracers.openat2.OpenTracer +.. autoclass:: duetector.tracers.bcc.openat2.OpenTracer :members: :undoc-members: :private-members: diff --git a/docs/source/tracers/tcpconnect.rst b/docs/source/tracers/tcpconnect.rst index a922e47..8d05763 100644 --- a/docs/source/tracers/tcpconnect.rst +++ b/docs/source/tracers/tcpconnect.rst @@ -1,7 +1,7 @@ TcpconnectTracer ================================== -.. autoclass:: duetector.tracers.tcpconnect.TcpconnectTracer +.. autoclass:: duetector.tracers.bcc.tcpconnect.TcpconnectTracer :members: :undoc-members: :private-members: diff --git a/docs/source/tracers/uname.rst b/docs/source/tracers/uname.rst index d3c2d9a..86e8c3c 100644 --- a/docs/source/tracers/uname.rst +++ b/docs/source/tracers/uname.rst @@ -1,7 +1,7 @@ UnameTracer ================================== -.. autoclass:: duetector.tracers.uname.UnameTracer +.. autoclass:: duetector.tracers.sh.uname.UnameTracer :members: :undoc-members: :private-members: diff --git a/duetector/tracers/bcc/__init__.py b/duetector/tracers/bcc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/duetector/tracers/clone.py b/duetector/tracers/bcc/clone.py similarity index 100% rename from duetector/tracers/clone.py rename to duetector/tracers/bcc/clone.py diff --git a/duetector/tracers/openat2.py b/duetector/tracers/bcc/openat2.py similarity index 100% rename from duetector/tracers/openat2.py rename to duetector/tracers/bcc/openat2.py diff --git a/duetector/tracers/tcpconnect.py b/duetector/tracers/bcc/tcpconnect.py similarity index 100% rename from duetector/tracers/tcpconnect.py rename to duetector/tracers/bcc/tcpconnect.py diff --git a/duetector/tracers/register.py b/duetector/tracers/register.py index df08838..647fef3 100644 --- a/duetector/tracers/register.py +++ b/duetector/tracers/register.py @@ -1,4 +1,5 @@ # Expose for plugin system -from . import clone, openat2, tcpconnect, uname +from .bcc import clone, openat2, tcpconnect +from .sh import uname registers = [openat2, uname, tcpconnect, clone] diff --git a/duetector/tracers/sh/__init__.py b/duetector/tracers/sh/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/duetector/tracers/uname.py b/duetector/tracers/sh/uname.py similarity index 100% rename from duetector/tracers/uname.py rename to duetector/tracers/sh/uname.py