1. 03 Apr, 2020 2 commits
    • Rebecca Stambler's avatar
      internal/lsp, go/packages: don't log context cancellation errors · 44a64ad7
      Rebecca Stambler authored
      Instead of checking the context, check the error. This may expose some
      errors that are not wrapped correctly. Replaced all uses of errors
      with golang.org/x/xerrors.
      
      Change-Id: Ia40160f8ea352e02618765f2a9415a4ece0dcd94
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/227036
      
      
      Run-TryBot: Rebecca Stambler <rstambler@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Findley <rfindley@google.com>
      44a64ad7
    • Michael Matloob's avatar
      go/packages: only list current module's directory in determineRootDirs · 4480df5f
      Michael Matloob authored
      When determining the root directory of a module, the go list overlay
      code would do a go list -m all to get the module information for all
      modules. Stop doing that and only list the current module. This fixes
      an issue when users had overlays and were using automatic vendoring
      because go list -m all doesn't work with automatic vendoring.
      
      It isn't clear if overlays outside of the main module were ever working
      and overlays in the module cache don't make sense. There's a chance that
      this might break users with overlays in replaced directories, but it's
      not clear that that previously worked, and it wasn't tested. If this
      change causes breakages, we can use bcmills' suggestion in
      golang.org/issue/37629#issuecomment-594179751 point 3 to fix it.
      
      Fixes golang/go#37629
      
      Change-Id: I826a86bbe54311cac72cbcafb2de4863dc805c2d
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/227117
      
      
      Run-TryBot: Michael Matloob <matloob@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRebecca Stambler <rstambler@golang.org>
      4480df5f
  2. 02 Apr, 2020 10 commits
  3. 01 Apr, 2020 1 commit
  4. 31 Mar, 2020 9 commits
  5. 30 Mar, 2020 6 commits
  6. 29 Mar, 2020 4 commits
    • Ian Cottrell's avatar
      internal/telemetry: minor improvement to span events · fd4102a8
      Ian Cottrell authored
      This changes span events to return a cheaper end function if there is
      no exporter and also to deliver the end event to the same exporter
      that the start even was delivered to rather than which was active
      when the end event is triggered.
      
      Change-Id: I831283da20e8cc991a0cf7490952ae194d125428
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/225737
      
      
      Run-TryBot: Ian Cottrell <iancottrell@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Findley <rfindley@google.com>
      fd4102a8
    • Ian Cottrell's avatar
      internal/telemetry: add fast non variadic event functions · 36db5297
      Ian Cottrell authored
      This adds variants of the main event functions that take specific
      numbers of tags, rather than a tag slice. This reduces the allocation
      cost when using those functions with no exporter to zero.
      
      name                old time/op    new time/op    delta
      /Baseline-8            158ns ± 7%     154ns ± 1%      ~
      /StdLog-8             6.90µs ± 1%    6.83µs ± 1%      ~
      /LogNoExporter-8      1.78µs ± 5%    1.20µs ± 3%   -32.37%
      /TraceNoExporter-8    3.11µs ± 3%    2.48µs ± 2%   -20.39%
      /StatsNoExporter-8    3.18µs ± 5%    1.87µs ± 3%   -41.16%
      /Log-8                46.8µs ± 2%    44.8µs ± 1%    -4.33%
      /Trace-8              55.1µs ± 5%    54.3µs ± 3%      ~
      /Stats-8              15.8µs ± 3%    13.4µs ± 1%   -15.00%
      
      name                old alloc/op   new alloc/op   delta
      /Baseline-8            0.00B          0.00B           ~
      /StdLog-8               552B ± 0%      552B ± 0%      ~
      /LogNoExporter-8      1.02kB ± 0%    0.00kB       -100.00%
      /TraceNoExporter-8    1.54kB ± 0%    0.51kB ± 0%   -66.67%
      /StatsNoExporter-8    2.05kB ± 0%    0.00kB       -100.00%
      /Log-8                26.0kB ± 0%    24.0kB ± 0%    -7.87%
      /Trace-8              28.7kB ± 0%    27.1kB ± 0%      ~
      /Stats-8              13.3kB ± 0%    10.2kB ± 0%   -23.08%
      
      name                old allocs/op  new allocs/op  delta
      /Baseline-8             0.00           0.00           ~
      /StdLog-8               30.0 ± 0%      30.0 ± 0%      ~
      /LogNoExporter-8        16.0 ± 0%       0.0       -100.00%
      /TraceNoExporter-8      32.0 ± 0%      16.0 ± 0%   -50.00%
      /StatsNoExporter-8      32.0 ± 0%       0.0       -100.00%
      /Log-8                   430 ± 0%       382 ± 0%   -11.16%
      /Trace-8                 496 ± 0%       464 ± 0%    -6.45%
      /Stats-8                 192 ± 0%       128 ± 0%   -33.33%
      
      Change-Id: I629c0d506ab07de6f12b0acbecfc7407f59a4285
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/225580
      
      
      Run-TryBot: Ian Cottrell <iancottrell@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: default avatarRobert Findley <rfindley@google.com>
      36db5297
    • Ian Cottrell's avatar
      internal/telemetry: use tags instead of special event fields. · f61d083d
      Ian Cottrell authored
      Change-Id: I0e6a26c62bd1f6eaa07c38a06152cb7a0f2eedc2
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/225579
      
      
      Run-TryBot: Ian Cottrell <iancottrell@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: default avatarRobert Findley <rfindley@google.com>
      f61d083d
    • Ian Cottrell's avatar
      internal/telemetry: change tag to use type specific storage · f8bbb569
      Ian Cottrell authored
      Because packing values into interface{} causes allocations
      this gives us a major improvement on allocation count, but
      tag is bigger so a significant loss on bytes allocated.
      It is a minor performance win overall, especially in the
      null exporter case when it really matters the most.
      
      name                old time/op    new time/op    delta
      /Baseline-8            147ns ± 3%     146ns ± 3%     ~     (p=0.349 n=5+5)
      /StdLog-8             6.83µs ± 1%    6.78µs ± 2%     ~     (p=0.548 n=5+5)
      /LogNoExporter-8      1.15µs ± 1%    1.05µs ± 1%   -8.63%  (p=0.008 n=5+5)
      /TraceNoExporter-8    1.01µs ± 4%    0.99µs ± 1%     ~     (p=0.087 n=5+5)
      /StatsNoExporter-8    1.89µs ± 0%    1.95µs ± 3%   +3.27%  (p=0.016 n=4+5)
      /Log-8                23.7µs ± 1%    24.4µs ± 6%   +3.14%  (p=0.032 n=5+5)
      /Trace-8              42.2µs ± 1%    42.2µs ± 1%     ~     (p=0.841 n=5+5)
      /Stats-8              7.37µs ± 3%    7.10µs ± 1%   -3.74%  (p=0.008 n=5+5)
      
      name                old alloc/op   new alloc/op   delta
      /Baseline-8            0.00B          0.00B          ~     (all equal)
      /StdLog-8               552B ± 0%      552B ± 0%     ~     (all equal)
      /LogNoExporter-8        680B ± 0%     1024B ± 0%  +50.59%  (p=0.008 n=5+5)
      /TraceNoExporter-8      512B ± 0%      512B ± 0%     ~     (all equal)
      /StatsNoExporter-8    1.26kB ± 0%    2.05kB ± 0%  +62.03%  (p=0.008 n=5+5)
      /Log-8                5.20kB ± 0%    6.06kB ± 0%  +16.46%  (p=0.008 n=5+5)
      /Trace-8              11.8kB ± 0%    11.8kB ± 0%     ~     (p=0.167 n=5+5)
      /Stats-8              2.29kB ± 0%    3.07kB ± 0%  +34.27%  (p=0.008 n=5+5)
      
      name                old allocs/op  new allocs/op  delta
      /Baseline-8             0.00           0.00          ~     (all equal)
      /StdLog-8               30.0 ± 0%      30.0 ± 0%     ~     (all equal)
      /LogNoExporter-8        30.0 ± 0%      16.0 ± 0%  -46.67%  (p=0.008 n=5+5)
      /TraceNoExporter-8      16.0 ± 0%      16.0 ± 0%     ~     (all equal)
      /StatsNoExporter-8      62.0 ± 0%      32.0 ± 0%  -48.39%  (p=0.008 n=5+5)
      /Log-8                   172 ± 0%       158 ± 0%   -8.14%  (p=0.008 n=5+5)
      /Trace-8                 336 ± 0%       336 ± 0%     ~     (all equal)
      /Stats-8                94.0 ± 0%      64.0 ± 0%  -31.91%  (p=0.008 n=5+5)
      
      Change-Id: I81d2443c9a32d25a5b60fffa60759caa33566da2
      Reviewed-on: https://go-review.googlesource.com/c/tools/+/225381
      
      
      Run-TryBot: Ian Cottrell <iancottrell@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Reviewed-by: default avatarRobert Findley <rfindley@google.com>
      f8bbb569
  7. 28 Mar, 2020 1 commit
  8. 27 Mar, 2020 7 commits