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

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

                Author: ASF GitHub Bot
            Created on: 02/May/18 00:11
            Start Date: 02/May/18 00:11
    Worklog Time Spent: 10m 
      Work Description: jasonkuster closed pull request #5256: [BEAM-4224] 
Update perf.go: only trigger on processing bundles
URL: https://github.com/apache/beam/pull/5256
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/go/pkg/beam/x/hooks/perf/perf.go 
b/sdks/go/pkg/beam/x/hooks/perf/perf.go
index b5c70e46a0f..e0a816284e6 100644
--- a/sdks/go/pkg/beam/x/hooks/perf/perf.go
+++ b/sdks/go/pkg/beam/x/hooks/perf/perf.go
@@ -49,15 +49,15 @@ func init() {
                enabled := len(enabledProfCaptureHooks) > 0
                var cpuProfBuf bytes.Buffer
                return hooks.Hook{
-                       Req: func(ctx context.Context, _ 
*fnpb.InstructionRequest) (context.Context, error) {
-                               if !enabled {
+                       Req: func(ctx context.Context,  req 
*fnpb.InstructionRequest) (context.Context, error) {
+                               if !enabled || req.GetProcessBundle() == nil {
                                        return ctx, nil
                                }
                                cpuProfBuf.Reset()
                                return ctx, pprof.StartCPUProfile(&cpuProfBuf)
                        },
                        Resp: func(ctx context.Context, req 
*fnpb.InstructionRequest, _ *fnpb.InstructionResponse) error {
-                               if !enabled {
+                               if !enabled || req.GetProcessBundle() == nil {
                                        return nil
                                }
                                pprof.StopCPUProfile()


 

----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 97301)
    Time Spent: 0.5h  (was: 20m)

> Go SDK CPU Profiling
> --------------------
>
>                 Key: BEAM-4224
>                 URL: https://issues.apache.org/jira/browse/BEAM-4224
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-go
>            Reporter: Robert Burke
>            Assignee: Henning Rohde
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Umbrella Jira tracking work around CPU profiling the Go SDK.
> Prior to this, a hook that enables the Go CPU and trace profiling libraries 
> was added in the following PR
> https://github.com/apache/beam/commit/adb78f6c3055693a053a89bdbaa46ca86685a290



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

Reply via email to