-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces profiling capabilities to LDMS operations, including lookup, update, set_delete, and stream_publish. It collects timestamps for key events, such as API calls, request/response exchanges, and completion notifications. The feature is disabled by default but can be configured using the 'profilng' configuration command to enable, disable, or reset data collection. This enhancement will aid in performance analysis and optimization.
- Loading branch information
Showing
16 changed files
with
1,151 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pkgpythondir=${pythondir}/ldmsd | ||
pkgpython_PYTHON = __init__.py ldmsd_setup.py ldmsd_util.py ldmsd_communicator.py ldmsd_config.py | ||
pkgpython_PYTHON = __init__.py ldmsd_setup.py ldmsd_util.py ldmsd_communicator.py ldmsd_config.py ldmsd_profiling.py | ||
dist_bin_SCRIPTS = ldmsd_controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import json | ||
import pandas as pd | ||
|
||
from ldmsd.ldmsd_communicator import * | ||
|
||
def profiling_as_json(xprt, host, port): | ||
comm = Communicator(xprt=xprt, host=host, port=port) | ||
comm.connect() | ||
o = comm.profiling() | ||
return json.loads(o[1]) | ||
|
||
def get_hosts(o): | ||
return o['xprt'].keys() | ||
|
||
def get_streams(o): | ||
return o['stream'].keys() | ||
|
||
def lookup_df(o, host): | ||
df = pd.DataFrame(o['xprt'][host]['LOOKUP']) | ||
return df | ||
|
||
def update_df(o, host): | ||
df = pd.DataFrame(o['xprt'][host]['UPDATE']) | ||
return df | ||
|
||
def send_df(o, host): | ||
df = pd.DataFrame(o['xprt'][host]['SEND']) | ||
return df | ||
|
||
def set_delete_df(o, host): | ||
df = pd.DataFrame(o['xprt'][host]['SET_DELETE']) | ||
return df | ||
|
||
def stream_publish_df(o, host): | ||
df = pd.DataFrame(o['xprt'][host]['STREAM_PUBLISH']) | ||
return df | ||
|
||
def stream_by_stream_df(o, stream_name = None, src = None): | ||
d = o['stream'] | ||
if stream_name is not None: | ||
d = d[stream_name] | ||
if src is not None: | ||
d = d[src] | ||
df = pd.DataFrame(d) | ||
return df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.