• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

silvermine / dynamodb-capacity-manager / 104
70%
master: 70%

Build:
Build:
LAST BUILD BRANCH: MrMarCode/upgrade-to-node-20
DEFAULT BRANCH: master
Ran 25 Apr 2018 07:08PM UTC
Jobs 3
Files 22
Run time 48s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
104

push

travis-ci

onebytegone
Use seconds rather than milliseconds for x-axis of regression

When we were using milliseconds as the x-axis for the regression, there were
some rare cases in which the regression function would return NaN. The sample
data added as a test in this commit is one of these cases. With the sample
data, this was occuring because the `rhs` input to the [`gaussianElimination`
function][1] was:

```js
[
   [ 20, 30424398600000, 4.628220150858649e+25 ],
   [ 30424398600000, 4.628220150858649e+25, 7.040540733914512e+37 ],
   [ 4.628220150858649e+25, 7.040540733914512e+37, 1.0710210882409248e+50 ],
   [ 140.33333333333337, 213477862297500, 3.2474677689629145e+26 ],
]
```

This then resulted in the following chain of calculations occuring [here][2]:

```
-7.310223315482211e+24 = 7.040540733914512e+37 - (1.0710210882409248e+50 * 30424398600000 / 4.628220150858649e+25)
-2396591751168 = 4.628220150858649e+25 - (7.040540733914512e+37 * 30424398600000 / 4.628220150858649e+25)
-9603546873856 = 4.628220150858649e+25 - (1.0710210882409248e+50 * 20 / 4.628220150858649e+25)
-3.1484375 = 30424398600000 - (7.040540733914512e+37 * 20 / 4.628220150858649e+25)
0 = -9603546873856 - (-7.310223315482211e+24 * -3.1484375 / -2396591751168)
```

The resulting 0 then causes a divide by zero error [here][3]. WolframAlpha
reports that the value for the last calculation should have actually been
`0.0002748272381722927093505859375`.

```
x = -9603546873856 - (-7.310223315482211e+24 * -3.1484375 / -2396591751168)
x = -9603546873856 - (-7310223315482211000000000 * -3.1484375 / -2396591751168)
x = -9603546873856 - (23015781219838523695312500 / -2396591751168)
x = -9603546873856 - (-9603546873856.0002748272381722927093505859375)
x = -9603546873856 + 9603546873856.0002748272381722927093505859375
x = 0.0002748272381722927093505859375
```

By using a scale of seconds for the x-axis regression, the following is used
for the `rhs` for the `gaussianElimination` function:

```
[
   [ 20, 30424398600,... (continued)

5 of 5 new or added lines in 1 file covered. (100.0%)

221 of 317 relevant lines covered (69.72%)

51.18 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
13
100.0
src/StatisticsRetriever.js
Jobs
ID Job ID Ran Files Coverage
1 104.1 25 Apr 2018 07:08PM UTC 0
69.72
Travis Job 104.1
2 104.2 25 Apr 2018 07:08PM UTC 0
69.72
Travis Job 104.2
3 104.3 25 Apr 2018 07:09PM UTC 0
69.72
Travis Job 104.3
Source Files on build 104
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #104
  • 0bf3fe76 on github
  • Prev Build on fix_nan_forecast (#98)
  • Next Build on fix_nan_forecast (#106)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc