You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/13 13:12:00 UTC

[jira] [Work logged] (BEAM-588) All runners should support ProfilingOptions

     [ https://issues.apache.org/jira/browse/BEAM-588?focusedWorklogId=165415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-165415 ]

ASF GitHub Bot logged work on BEAM-588:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Nov/18 13:11
            Start Date: 13/Nov/18 13:11
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on a change in pull request #6847: [BEAM-588] Implement profiling for Python DirectRunner and SDK Harness.
URL: https://github.com/apache/beam/pull/6847#discussion_r232679825
 
 

 ##########
 File path: sdks/python/apache_beam/utils/profiler.py
 ##########
 @@ -59,14 +64,17 @@ def __exit__(self, *args):
 
     if self.profile_location and self.file_copy_fn:
       dump_location = os.path.join(
-          self.profile_location, 'profile',
-          ('%s-%s' % (time.strftime('%Y-%m-%d_%H_%M_%S'), self.profile_id)))
+          self.profile_location,
+          time.strftime(self.time_prefix + self.profile_id))
       fd, filename = tempfile.mkstemp()
-      self.profile.dump_stats(filename)
-      logging.info('Copying profiler data to: [%s]', dump_location)
-      self.file_copy_fn(filename, dump_location)  # pylint: disable=protected-access
-      os.close(fd)
-      os.remove(filename)
+      try:
+        os.close(fd)
 
 Review comment:
   With mkstemp the user is responsible for cleaning up (i.e. deleting the file). 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 165415)
            Time Spent: 10m
    Remaining Estimate: 0h

> All runners should support ProfilingOptions
> -------------------------------------------
>
>                 Key: BEAM-588
>                 URL: https://issues.apache.org/jira/browse/BEAM-588
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Ahmet Altay
>            Priority: Minor
>              Labels: newbie, starter
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://github.com/apache/incubator-beam/blob/python-sdk/sdks/python/apache_beam/utils/options.py#L366
> This is useful for profiling pipelines in different environments.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)