Skip to content

refactor out shared code into granulate_utils #923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gprofiler/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from requests import Session

from gprofiler import __version__
from gprofiler.exceptions import APIError
from granulate_utils.gprofiler.exceptions import APIError
from gprofiler.log import get_logger_adapter
from gprofiler.utils import get_iso8601_format_time, get_iso8601_format_time_from_epoch_time

Expand Down
109 changes: 0 additions & 109 deletions gprofiler/exceptions.py

This file was deleted.

6 changes: 3 additions & 3 deletions gprofiler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from gprofiler.consts import CPU_PROFILING_MODE
from gprofiler.containers_client import ContainerNamesClient
from gprofiler.diagnostics import log_diagnostics, set_diagnostics
from gprofiler.exceptions import APIError, NoProfilersEnabledError
from granulate_utils.gprofiler.exceptions import APIError, NoProfilersEnabledError
from gprofiler.gprofiler_types import ProcessToProfileData, UserArgs, integers_list, positive_integer
from gprofiler.log import RemoteLogsHandler, initial_root_logger_setup
from gprofiler.merge import concatenate_from_external_file, concatenate_profiles, merge_profiles
Expand All @@ -57,7 +57,7 @@
from gprofiler.metadata.external_metadata import ExternalMetadataStaleError, read_external_metadata
from gprofiler.metadata.metadata_collector import get_current_metadata, get_static_metadata
from gprofiler.metadata.system_metadata import get_hostname, get_run_mode, get_static_system_info
from gprofiler.platform import is_linux, is_windows
from granulate_utils.gprofiler.platform import is_linux, is_windows
from gprofiler.profiler_state import ProfilerState
from gprofiler.profilers.factory import get_profilers
from gprofiler.profilers.profiler_base import NoopProfiler, ProcessProfilerBase, ProfilerInterface
Expand All @@ -75,7 +75,7 @@
resource_path,
run_process,
)
from gprofiler.utils.fs import escape_filename, mkdir_owned_root
from granulate_utils.gprofiler.utils.fs import escape_filename, mkdir_owned_root
from gprofiler.utils.proxy import get_https_proxy

if is_linux():
Expand Down
2 changes: 1 addition & 1 deletion gprofiler/metadata/application_identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from gprofiler.log import get_logger_adapter
from gprofiler.metadata.base_application_identifier import _ApplicationIdentifier
from gprofiler.metadata.enrichment import EnrichmentOptions
from gprofiler.platform import is_linux
from granulate_utils.gprofiler.platform import is_linux

if is_linux():
from gprofiler.metadata.application_identifiers_java import (
Expand Down
2 changes: 1 addition & 1 deletion gprofiler/metadata/application_identifiers_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from psutil import Process

from gprofiler.exceptions import CalledProcessError
from granulate_utils.gprofiler.exceptions import CalledProcessError
from gprofiler.log import get_logger_adapter
from gprofiler.metadata.base_application_identifier import _ApplicationIdentifier
from gprofiler.profilers.java import JattachJcmdRunner
Expand Down
2 changes: 1 addition & 1 deletion gprofiler/metadata/application_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from gprofiler.log import get_logger_adapter
from gprofiler.metadata.versions import get_exe_version
from gprofiler.platform import is_windows
from granulate_utils.gprofiler.platform import is_windows

logger = get_logger_adapter(__name__)

Expand Down
2 changes: 1 addition & 1 deletion gprofiler/metadata/system_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from granulate_utils.linux.ns import run_in_ns

from gprofiler.log import get_logger_adapter
from gprofiler.platform import is_linux, is_windows
from granulate_utils.gprofiler.platform import is_linux, is_windows
from gprofiler.utils import is_pyinstaller, run_process

if is_linux():
Expand Down
30 changes: 0 additions & 30 deletions gprofiler/platform.py

This file was deleted.

2 changes: 1 addition & 1 deletion gprofiler/profilers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE: Make sure to import any new process profilers to load it
from gprofiler.platform import is_linux
from granulate_utils.gprofiler.platform import is_linux
from gprofiler.profilers.dotnet import DotnetProfiler
from gprofiler.profilers.python import PythonProfiler

Expand Down
4 changes: 2 additions & 2 deletions gprofiler/profilers/dotnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from granulate_utils.linux.process import is_process_basename_matching
from psutil import Process

from gprofiler.exceptions import ProcessStoppedException, StopEventSetException
from granulate_utils.gprofiler.exceptions import ProcessStoppedException, StopEventSetException
from gprofiler.gprofiler_types import ProfileData
from gprofiler.log import get_logger_adapter
from gprofiler.metadata.application_metadata import ApplicationMetadata
from gprofiler.platform import is_windows
from granulate_utils.gprofiler.platform import is_windows
from gprofiler.profiler_state import ProfilerState
from gprofiler.profilers.profiler_base import ProcessProfilerBase
from gprofiler.profilers.registry import register_profiler
Expand Down
2 changes: 1 addition & 1 deletion gprofiler/profilers/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from gprofiler.log import get_logger_adapter
from gprofiler.metadata.system_metadata import get_arch
from gprofiler.platform import is_windows
from granulate_utils.gprofiler.platform import is_windows
from gprofiler.profilers.perf import SystemProfiler
from gprofiler.profilers.profiler_base import NoopProfiler
from gprofiler.profilers.registry import get_profilers_registry
Expand Down
Loading
Loading