Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: fakeNetflix/servo

Tags

v0.12.25

Toggle v0.12.25's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
avoid mem leak for improper use of registerObject (Netflix#451)

Calling `Monitors.registerObject` with a monitor such as
a `BasicCounter` instance will register an empty composite
monitor with an id like `default:class=BasicCounter`. When
using the spectator integration this would result is a
memory leak because it needs to track the instances to be
able to aggregate the results.

This change updates the registration to remove any previous
copies and overwrite which is the default for servo. It also
double checks if it is an empty basic composite and just
ignores those since they will never have any monitors to
collect.

It is a bit difficult to test without a bunch of reflection
to dig into the guts of the meter state. I did reproduce in
a debugger using the following test case and confirm the
state is no longer growing:

```java
@test
public void testBasicCounterLoop() {
  for (int i = 0; i < 1000; ++i) {
    BasicCounter c = new BasicCounter(CONFIG);
    Monitors.registerObject(c);
    c.increment();
  }
  assertEquals(1000, registry.counter(ID).count());
}
```

v0.12.24

Toggle v0.12.24's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
base StatsMonitor expiration on writes (Netflix#450)

Before it was using calls to `getMonitors` to update the
last used time. That method will not get called when
delegating to Spectator and thus it will always expire
15 minutes after registration and never come back.

This changes the last used time to get updated when
values are recorded rather than when they are read using
`getMonitors`.

v0.12.23

Toggle v0.12.23's commit message
v0.12.23

Fixes in the delegation to spectator

* Registration tags

* Custom counters mapped to monotonic counters

v0.12.22

Toggle v0.12.22's commit message
v0.12.22

Delegate to spectator. The goal is to ease the transition of servo to
spectator at Netflix.

v0.12.21

Toggle v0.12.21's commit message
getting indiv props instead of reading all props (Netflix#444)

Secured applications may not have access to all system properties on
a server. Making this change to prevent reading all the system properties
and just read the properties that are required for creating the
DefaultMonitorRegistry instance.

Fixes Netflix#443.

v0.12.20

Toggle v0.12.20's commit message
v.0.12.20

Adds `DynamicGauge`

v0.12.19

Toggle v0.12.19's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix name of publish env variable (Netflix#440)

It was `BINTRAY_PUBLISH` in the travis config but the
script is checking `GRADLE_PUBLISH`.

v0.12.18

Toggle v0.12.18's commit message
v0.12.18

Dependency updates, plus counters for errors getting values from
monitors.

v0.12.17

Toggle v0.12.17's commit message
variance is imprecise when size is small (Netflix#418)

In my opinion the current variance (and by consequence
the standard deviation) computation are imprecise, when
curSize is not high (when curSize < 10 for example):

```java
    variance = (sumSquares / curSize) - (mean * mean);
```

The computation I suggest in this pull request does not hurt
and is precise:

```java
    if (curSize == 1) {
      variance = 0d;
    } else {
      variance = (sumSquares - ((double) total * total / curSize)) / (curSize - 1);
    }
```

For reference:
http://web.archive.org/web/20050512031826/http://helios.bto.ed.ac.uk/bto/statistics/tress3.html