From f1def04193c791e4bafc04f94ac2377630fddb98 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Fri, 16 Dec 2016 12:53:18 +0100 Subject: [PATCH] Update vendoring for github.com/beorn7/perks/quantile --- vendor/github.com/beorn7/perks/LICENSE | 20 +++++++++++++++++++ .../beorn7/perks/quantile/stream.go | 2 +- vendor/vendor.json | 5 +++-- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 vendor/github.com/beorn7/perks/LICENSE diff --git a/vendor/github.com/beorn7/perks/LICENSE b/vendor/github.com/beorn7/perks/LICENSE new file mode 100644 index 00000000..339177be --- /dev/null +++ b/vendor/github.com/beorn7/perks/LICENSE @@ -0,0 +1,20 @@ +Copyright (C) 2013 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index 587b1fc5..f4cabd66 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go @@ -133,7 +133,7 @@ func (s *Stream) Query(q float64) float64 { if l == 0 { return 0 } - i := int(float64(l) * q) + i := int(math.Ceil(float64(l) * q)) if i > 0 { i -= 1 } diff --git a/vendor/vendor.json b/vendor/vendor.json index e92441fd..1657ce60 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -15,9 +15,10 @@ "revisionTime": "2016-05-31T23:09:58Z" }, { + "checksumSHA1": "spyv5/YFBjYyZLZa1U2LBfDR8PM=", "path": "github.com/beorn7/perks/quantile", - "revision": "b965b613227fddccbfffe13eae360ed3fa822f8d", - "revisionTime": "2015-02-23T14:51:52+01:00" + "revision": "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9", + "revisionTime": "2016-08-04T10:47:26Z" }, { "path": "github.com/coreos/go-systemd/dbus",