package metrics import ( "math" "sync" "sync/atomic" ) // EWMAs continuously calculate an exponentially-weighted moving average // based on an outside source of clock ticks. type EWMA interface { Rate() float64 Snapshot() EWMA Tick() Update(int64) } // NewEWMA constructs a new EWMA with the given alpha. func NewEWMA(alpha float64) EWMA { return &StandardEWMA{alpha: alpha} } // NewEWMA1 constructs a new EWMA for a one-minute moving average. func NewEWMA1() EWMA { return NewEWMA(1 - math.Exp(-5.0/60.0/1)) } // NewEWMA5 constructs a new EWMA for a five-minute moving average. func NewEWMA5() EWMA { return NewEWMA(1 - math.Exp(-5.0/60.0/5)) } // NewEWMA15 constructs a new EWMA for a fifteen-minute moving average. func NewEWMA15() EWMA { return NewEWMA(1 - math.Exp(-5.0/60.0/15)) } // EWMASnapshot is a read-only copy of another EWMA. type EWMASnapshot float64 // Rate returns the rate of events per second at the time the snapshot was // taken. func (a EWMASnapshot) Rate() float64 { return float64(a) } // Snapshot returns the snapshot. func (a EWMASnapshot) Snapshot() EWMA { return a } // Tick panics. func (EWMASnapshot) Tick() { panic("Tick called on an EWMASnapshot") } // Update panics. func (EWMASnapshot) Update(int64) { panic("Update called on an EWMASnapshot") } // NilEWMA is a no-op EWMA. type NilEWMA struct{} // Rate is a no-op. func (NilEWMA) Rate() float64 { return 0.0 } // Snapshot is a no-op. func (NilEWMA) Snapshot() EWMA { return NilEWMA{} } // Tick is a no-op. func (NilEWMA) Tick() {} // Update is a no-op. func (NilEWMA) Update(n int64) {} // StandardEWMA is the standard implementation of an EWMA and tracks the number // of uncounted events and processes them on each tick. It uses the // sync/atomic package to manage uncounted events. type StandardEWMA struct { uncounted int64 // /!\ this should be the first member to ensure 64-bit alignment alpha float64 rate float64 init bool mutex sync.Mutex } // Rate returns the moving average rate of events per second. func (a *StandardEWMA) Rate() float64 { a.mutex.Lock() defer a.mutex.Unlock() return a.rate * float64(1e9) } // Snapshot returns a read-only copy of the EWMA. func (a *StandardEWMA) Snapshot() EWMA { return EWMASnapshot(a.Rate()) } // Tick ticks the clock to update the moving average. It assumes it is called // every five seconds. func (a *StandardEWMA) Tick() { count := atomic.LoadInt64(&a.uncounted) atomic.AddInt64(&a.uncounted, -count) instantRate := float64(count) / float64(5e9) a.mutex.Lock() defer a.mutex.Unlock() if a.init { a.rate += a.alpha * (instantRate - a.rate) } else { a.init = true a.rate = instantRate } } // Update adds n uncounted events. func (a *StandardEWMA) Update(n int64) { atomic.AddInt64(&a.uncounted, n) } endabot/npm_and_yarn/devel/electron4/files/serve-10.1.2'>dependabot/npm_and_yarn/devel/electron4/files/serve-10.1.2 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/russian
Commit message (Expand)AuthorAgeFilesLines
* Remove expired ports:rene2019-10-165-62/+0
* russian/emkatic: update to 0.37swills2019-10-162-5/+4
* - Update to 6.3.2lwhsu2019-09-281-5/+5
* Deprecate a few portsantoine2019-09-161-0/+2
* russian/stardict-mueller7: fix previous commitmakc2019-09-081-2/+1
* - Fix fetch and unbreak stardict dictionariesmakc2019-09-089-23/+11
* Wordpress: Update to 5.2.3joneum2019-09-072-4/+4
* - Update to 6.3.1lwhsu2019-09-061-5/+5
* - Rebuild bootstrap (ppcx64 and ppc386) with ld patchesacm2019-09-031-1/+1
* - Update to 6.3.0lwhsu2019-08-201-5/+5
* - Bump PORTREVISION (lazarus ports were updated to 2.0.4)acm2019-08-161-2/+1
* Convert to UCL & cleanup pkg-message (categories [p-r])mat2019-08-147-11/+42
* Mark BROKEN: unfetchableantoine2019-08-058-0/+16
* russian/d1489: Use HTTPS in WWW.arrowd2019-08-031-1/+1
* - Update to 6.2.5lwhsu2019-07-081-5/+5
* Clean up final leftovers from Qt4.rene2019-06-261-3/+2
* Update to 5.2.2joneum2019-06-212-4/+4
* Update to 5.2.1joneum2019-06-162-4/+4
* - Update to 6.2.4lwhsu2019-05-241-5/+5
* WordPress: Update to 5.2joneum2019-05-112-4/+4
* Remove expired ports:rene2019-05-0220-17658/+0
* - Update to 6.2.3lwhsu2019-04-211-5/+5
* devel/eric6: update to 19.04dbn2019-04-081-3/+3
* Update to 5.1.1joneum2019-04-062-5/+5
* devel/eric6: update to 19.03dbn2019-04-011-3/+3
* Nuke xpi-* portsjbeich2019-03-304-33/+0
* Mark this port broken and set an expiration daterodrigo2019-03-281-4/+4
* Update to 6.2.2lwhsu2019-03-231-5/+5
* x11-fonts/mkfontscale: Update to 1.2.0zeising2019-03-121-1/+1
* - Bump PORTREVISION. editors/lazarus was updated to 2.0.0acm2019-03-071-1/+2
* */gimp-help*: Mark MAKE_JOBS_UNSAFEtobik2019-02-241-1/+1
* Drop maintainershipnovel2019-02-241-1/+1
* Fix Qt5 symbol version scripts to put the catch-all clause first. Whentijl2019-01-161-1/+1
* - Update WWWamdmi32019-01-091-1/+1
* Remove KDE4, part 5rene2019-01-015-1808/+0
* devel/eric6: update to 18.12dbn2018-12-111-3/+3
* Mark kde4-l10n ports deprecated.tcberner2018-11-241-0/+3
* Update to 6.0.7.jkim2018-11-091-5/+5
* devel/eric6: update to 18.11dbn2018-11-031-3/+3
* devel/eric6: update to 18.10dbn2018-10-291-3/+3
* Fix every instance of RUN_DEPENDS:=${BUILD_DEPENDS} in p5 ports, exceptdes2018-10-062-4/+4
* devel/eric6: update to 18.09dbn2018-09-091-3/+3
* Remove expired ports:rene2018-09-023-188/+0
* devel/eric6: update to 18.08dbn2018-08-181-3/+3
* Update to 4.9.8joneum2018-08-072-4/+4
* Remove all := from BUILD_DEPENDS, here are never needed.mat2018-07-091-2/+2
* Update to 4.9.7joneum2018-07-082-4/+4
* - Update to 6.0.5lwhsu2018-06-271-5/+5
* devel/eric6: update to 18.06dbn2018-06-141-3/+3
* Update WWWsunpoet2018-06-051-3/+1
* - Bump PORTREVISION (editors/lazarus was updated)acm2018-06-031-0/+1
* Update WWWsunpoet2018-05-283-3/+3
* Update to 4.9.6joneum2018-05-262-5/+4
* - Moved ports to Uses/lazarus.mkacm2018-05-262-33/+19
* - Update to 6.0.4lwhsu2018-05-101-5/+5
* devel/eric6: update to 18.05dbn2018-05-021-3/+3
* Only sleep in ports if BATCH/PACKAGE_BUILDING are not defined.mat2018-04-261-0/+2
* - Update to 6.0.3lwhsu2018-04-081-5/+5
* Update distinfosunpoet2018-04-072-3/+4
* - Migrate Mk/bsd.fpc.mk to Mk/Uses/fpc.mkacm2018-04-051-0/+1
* Update to 4.9.5sunpoet2018-04-052-4/+4
* devel/eric6: update to 18.03dbn2018-03-171-3/+3
* - Update LibreOffice to 6.0.2 [1]lwhsu2018-03-172-8/+5
* Reset vg@'s ports after he resigned.rene2018-02-243-3/+3
* Fix build by adding chm to USE_FPCantoine2018-02-221-1/+1
* Rename KDE4 meta portstcberner2018-02-101-1/+1
* Update to 4.9.4joneum2018-02-102-4/+4
* devel/eric6: update to 18.02dbn2018-02-081-3/+3
* - Bump PORTREVISION. Lazarus was updated to 1.8.0acm2018-02-011-2/+2
* Securityupdate to 4.9.2:joneum2018-01-192-4/+4
* lang/eric6: update to 17.12dbn2018-01-171-3/+3
* devel/eric6: update to 17.11.1, add FLAVORSdbn2018-01-112-3/+4
* Securityupdate to 4.9.1:joneum2017-12-022-7/+6
* For ports that are marked BROKEN on armv6, and also fail to build onlinimon2017-11-301-0/+1
* russian/wordpress: Update distinfoswills2017-11-202-3/+4
* russian/wordpress: Update to 4.9swills2017-11-172-4/+4
* Update to 5.3.7.jkim2017-11-031-5/+5
* */wordpress: update to 4.8.3joneum2017-11-022-4/+4
* evel/eric6: update to 17.10dbn2017-10-271-3/+3
* Change CONFLICTS to CONFLICTS_INSTALLrodrigo2017-10-151-1/+2
* Update to 4.8.2joneum2017-10-062-4/+4
* Fix kde4-l10n packages after sysutils/filelight's updatetcberner2017-09-172-2/+1
* Update to 5.3.6.jkim2017-09-061-5/+5
* Remove expired ports:rene2017-08-236-127/+0
* - russian/wordpress: Update from 4.8 to 4.8.1joneum2017-08-042-4/+4
* Update to 5.3.5.jkim2017-08-041-5/+5
* Deprecate ports BROKEN for more than 6 monthsantoine2017-07-221-0/+2
* Update to 5.3.4.jkim2017-06-221-5/+5
* Update the Calligra ports to 3.0.1.rakuco2017-06-175-90/+0
* - Update to 4.8wen2017-06-092-4/+4
* - Switch to options helpersamdmi32017-06-031-3/+6
* Mark some ports failing on armv6, for errors classified as "clang".linimon2017-05-271-1/+2
* Update to 5.3.3.jkim2017-05-201-5/+5
* Update to 4.7.5sunpoet2017-05-192-4/+4
* Update to 5.2.7.jkim2017-05-051-5/+5
* Chase ffmpeg 3.3 update (ABI changes)riggs2017-04-252-1/+2
* - Revert the php7 switch, we can't force users to switch to php7 yet.miwi2017-04-251-1/+0
* - Update to 4.7.4miwi2017-04-252-4/+5
* Rename the magic DISTVERSION into SPELLVERSION for the aspell ports.mat2017-04-121-1/+1
* Remove obsolete PROJECTHOST.mat2017-03-311-1/+0
* Update to 5.2.6.jkim2017-03-281-5/+5
* Remove all USE_OPENSSL occurrences.mat2017-03-151-2/+1
* russian/wordpress: Update from 4.7.2 to 4.7.3tz2017-03-072-4/+4
* - Bump PORTREVISION. Lazarus was update to 1.6.4acm2017-03-021-2/+2
* - Bump PORTREVISION. Freepascal was updatedacm2017-02-271-2/+1
* Update to 5.2.5.jkim2017-02-011-5/+5
* Update to 4.7.2sunpoet2017-01-282-4/+4
* Update WWW: SF redirects to https://sourceforge.net/projects/<PROJECT_NAME>/sunpoet2017-01-213-3/+3
* Extract do-patch into a separate script.mat2017-01-171-2/+1
* Update to 4.7.1sunpoet2017-01-152-4/+4
* Update to 5.2.4.jkim2017-01-021-5/+5
* - Mark BROKEN on 11.x:amdmi32016-12-291-11/+6
* - Update to 4.7sunpoet2016-12-162-4/+4
* Remove libiconv.so.3 compatibility link that was added in r374303 totijl2016-12-091-1/+1
* Don't quote {} in find -exec calls.mat2016-12-011-1/+1
* - Update to 0.28acm2016-11-222-5/+6
* devel/eric6: update to 6.1.11dbn2016-11-191-3/+3
* Update libreoffice to 5.2.3 and liborcus to 0.11.2bapt2016-11-121-4/+5
* Mark as broken on aarch64. While here, pet portlint.linimon2016-11-111-5/+6
* ${RM} already has -f.mat2016-10-211-1/+1
* Reassign makc's ports back to the pool.rakuco2016-10-204-4/+4
* devel/eric6: update to 6.1.10.dbn2016-10-101-3/+3
* russian/fortuneru: Once again, mark this port BROKEN (unfetchable)marino2016-09-201-0/+2
* Revert recent strfile changes, strfile is already in baseantoine2016-09-151-9/+11
* russian/fortuneru: Use fortune_strfile instead of strfile(8) and mark BROKENmarino2016-09-141-11/+9
* - Update to 4.6.1amdmi32016-09-082-4/+4
* - Update to 4.6amdmi32016-09-072-8/+6
* devel/eric6: update to 6.1.9dbn2016-09-061-3/+3
* russian/xruskb: revbump required after previous changesmarino2016-09-011-1/+1
* - Add LICENSEamdmi32016-08-263-11/+11
* devel/eric6: update to 6.1.8.dbn2016-08-201-3/+3
* Prevent collision with getline(3)bapt2016-07-301-0/+29
* Site changed to httpsache2016-07-231-1/+1
* Cleanup $() variables in ports Makefiles.mat2016-07-201-1/+1
* Remove expired ports without open PRs:rene2016-07-058-68/+0
* eric6 ports: Update to version 6.1.7.bsam2016-07-051-3/+3
* - Update to 4.5.3 [1]amdmi32016-06-232-9/+9
* eric6 ports: Update to version 6.1.6.bsam2016-06-061-2/+3
* Deprecate ports broken for more than 6 monthsantoine2016-06-042-0/+5
* Many KDE i10n ports: Patch updates CURDIRpi2016-05-261-1/+1
* editors/calligra-l10n: add plist-subpi2016-05-242-71/+71
* Cleanup some other NO_PACKAGE madness.mat2016-05-241-1/+0
* - Fix trailing whitespace in pkg-messagesamdmi32016-05-191-1/+1
* - Fix trailing whitespace in pkg-descrs, categories [p-x]*amdmi32016-05-193-3/+3
* eric6 ports: Update to version 6.1.5.bsam2016-05-101-2/+2
* russian/wordpress: update 4.5.1 -> 4.5.2robak2016-05-082-3/+3
* Update to 5.0.6.jkim2016-05-071-4/+4
* - Update to 4.5.1wen2016-04-282-3/+3
* Convert USES=gem:autoplist to USES=gem since autoplist is defaultswills2016-04-281-1/+1
* create USES=gem and update rubygem- ports to use itswills2016-04-281-2/+1
* Remove expired ports:rene2016-04-234-27/+0
* many ports: mark broken on powerpc64swills2016-04-221-0/+2
* eric6 ports: update to version 6.1.4 (reaaly, previous updatebsam2016-04-221-2/+2
* eric6 ports: update to version 6.1.4.bsam2016-04-221-2/+2
* russian/wordpress: update 4.4.2 -> 4.5robak2016-04-132-3/+3
* Remove ${PORTSDIR}/ from dependencies, categories r, s, t, and u.mat2016-04-018-18/+18
* Add missing items to the calligra-l10n ports plists.rakuco2016-03-292-0/+2
* - Update to 0.27acm2016-03-182-5/+4
* Remove expired ports:rene2016-03-143-23/+0
* Set an expiration date for a few deprecated leaf portsantoine2016-03-141-0/+1
* - Makefile.local for slave ports is included by bsd.port.mk r397519dinoex2016-02-281-4/+0
* Remove russian/muttprint.rakuco2016-02-253-157/+0
* - Update to 4.4.2miwi2016-02-232-3/+3
* Update to 5.0.5.jkim2016-02-161-4/+4
* www/MT: update to 5.2.13; set to deprectaionrm2016-02-14