myrne / performance-now

Implements performance.now (based on process.hrtime).
MIT License
162 stars 26 forks source link

Test case failure while building performance-now on PowerPC64LE - ppc64le #26

Open sarveshtamba opened 4 years ago

sarveshtamba commented 4 years ago

Trying the build using npm install, getting the following test case failure while building performance-now on PowerPC64LE - ppc64le:-

> mocha && tsc --noEmit test/test-typings.ts

  now
    ✓ reported time differs at most 1ms from a freshly reported uptime
    ✓ two subsequent calls return an increasing number
    ✓ has less than 10 microseconds overhead
    ✓ can be called 1 million times in under 1 second (averaging under 1 microsecond per call) (104ms)
    ✓ for 10,000 numbers, number n is never bigger than number n-1 (112ms)
    ✓ shows that at least 0.2 ms has passed after a timeout of 1 ms
    ✓ shows that at most 3 ms has passed after a timeout of 1 ms
    ✓ shows that at least 190ms ms has passed after a timeout of 200ms (201ms)
    ✓ shows that at most 220 ms has passed after a timeout of 200ms (200ms)

  scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)
    ✓ printed 94.712
    1) printed a value above 100
    ✓ printed a value below 350

  scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)
    ✓ printed 348.388
    2) printed a value above 350
    ✓ printed a value below 600

  scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)
    ✓ printed 347.651
    3) printed a value above 350
    ✓ printed a value below 600

  scripts/difference.coffee
    ✓ printed 0.004
    4) printed a value above 0.005
    ✓ printed a value below 0.07

  17 passing (638ms)
  4 failing

  1) scripts/initital-value.coffee (module.uptime(), expressed in milliseconds) printed a value above 100:
     AssertionError: expected '94.712' to be above 100
      at Function.assert.isAbove (node_modules/chai/lib/chai/interface/assert.js:254:35)
      at Context.<anonymous> (test/scripts.coffee:8:45)
      at processImmediate (internal/timers.js:456:21)

  2) scripts/delayed-require.coffee (sum of uptime and 250 ms delay`) printed a value above 350:
     AssertionError: expected '348.388' to be above 350
      at Function.assert.isAbove (node_modules/chai/lib/chai/interface/assert.js:254:35)
      at Context.<anonymous> (test/scripts.coffee:14:45)
      at processImmediate (internal/timers.js:456:21)

  3) scripts/delayed-call.coffee (sum of uptime and 250 ms delay`) printed a value above 350:
     AssertionError: expected '347.651' to be above 350
      at Function.assert.isAbove (node_modules/chai/lib/chai/interface/assert.js:254:35)
      at Context.<anonymous> (test/scripts.coffee:20:45)
      at processImmediate (internal/timers.js:456:21)

  4) scripts/difference.coffee printed a value above 0.005:
     AssertionError: expected '0.004' to be above 0.005
      at Function.assert.isAbove (node_modules/chai/lib/chai/interface/assert.js:254:35)
      at Context.<anonymous> (test/scripts.coffee:26:47)
      at processImmediate (internal/timers.js:456:21)

npm ERR! Test failed.  See above for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! performance-now@2.1.0 prepublish: `npm test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the performance-now@2.1.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-04-10T10_25_56_533Z-debug.log

Any help would be greatly appreciated.