diff options
author | Valery Piashchynski <[email protected]> | 2021-07-22 14:31:58 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-22 14:31:58 +0300 |
commit | b28dbda1f5e56f7b0fa1141cf6de4f008f3e8086 (patch) | |
tree | 810abbe9bf9be43fa396931ccbf2158c97b0608d /plugins | |
parent | fedf012e632a31d2d0837c22832c7683547ad379 (diff) |
Passing by ptr is slightly faster:
Benchmark_Ptr
Benchmark_Ptr-32 907456771 1.354 ns/op 0 B/op 0 allocs/op
Benchmark_Value
Benchmark_Value-32 791122101 1.366 ns/op 0 B/op 0 allocs/o
In terms of OPS.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/jobs/plugin.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/jobs/plugin.go b/plugins/jobs/plugin.go index 219799b8..6d376cf6 100644 --- a/plugins/jobs/plugin.go +++ b/plugins/jobs/plugin.go @@ -205,6 +205,7 @@ func (p *Plugin) Serve() chan error { //nolint:gocognit 4. Timeout in seconds 5. Pipeline name */ + ctx, err := jb.Context() if err != nil { errNack := jb.Nack() |