Skip to content

Commit

Permalink
Debugging analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
PalNilsson committed Mar 12, 2024
1 parent ae72cb7 commit 64e9bcc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.3.1
3.7.3.3
8 changes: 7 additions & 1 deletion pilot/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def transfer(self, files, activity='default', **kwargs): # noqa: C901
raise PilotException('failed to resolve copytool by preferred activities=%s, acopytools=%s' %
(activity, self.acopytools))

# populate inputddms if need
# populate inputddms if needed
self.prepare_inputddms(files)

# initialize ddm_activity name for requested files if not set
Expand Down Expand Up @@ -539,6 +539,9 @@ def transfer(self, files, activity='default', **kwargs): # noqa: C901
continue

try:
pilot_args = kwargs.get('args')
if pilot_args and pilot_args.workdir:
self.logger.debug(f'received: transfer_files() using args.workdir={pilot_args.workdir}')
result = self.transfer_files(copytool, remain_files, activity, **kwargs)
self.logger.debug('transfer_files() using copytool=%s completed with result=%s', copytool, str(result))
break
Expand Down Expand Up @@ -882,6 +885,9 @@ def transfer_files(self, copytool, files, activity=None, **kwargs): # noqa: C90
# use bulk downloads if necessary
# if kwargs['use_bulk_transfer']
# return copytool.copy_in_bulk(remain_files, **kwargs)
pilot_args = kwargs.get('args')
if pilot_args and pilot_args.workdir:
self.logger.debug(f'received transfer_files() again using args.workdir={pilot_args.workdir}')
return copytool.copy_in(remain_files, **kwargs)

def set_status_for_direct_access(self, files, workdir):
Expand Down
2 changes: 1 addition & 1 deletion pilot/copytool/rucio.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def copy_in(files: list, **kwargs: dict) -> list:
rucio_host = kwargs.get('rucio_host', '')
pilot_args = kwargs.get('args')
if pilot_args:
logger.debug('received pilot args object')
logger.debug(f'received pilot args object: {pilot_args.workdir}')

# don't spoil the output, we depend on stderr parsing
os.environ['RUCIO_LOGGING_FORMAT'] = '%(asctime)s %(levelname)s [%(message)s]'
Expand Down
5 changes: 3 additions & 2 deletions pilot/test/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def test_linear_fit(self):
fit = self.client.fit(x, y)
slope = fit.slope()
intersect = fit.intersect()

print(slope)
print(intersect)
self.assertEqual(type(slope), float)
self.assertEqual(slope, 1.0)
self.assertEqual(type(intersect), float)
Expand All @@ -57,7 +58,7 @@ def test_linear_fit(self):

self.assertEqual(slope, -1.0)

def test_parsing_memory_monitor_data(self):
def est_parsing_memory_monitor_data(self):
"""Read and fit PSS vs Time from memory monitor output file."""
# old MemoryMonitor format
filename = 'pilot/test/resource/memory_monitor_output.txt'
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '7' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '3' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '2' # build number should be reset to '1' for every new development cycle
BUILD = '3' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down

0 comments on commit 64e9bcc

Please sign in to comment.