Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GoogleCloudPlatform/opentelemetry-operations-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: aabmass/opentelemetry-operations-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: hrtime-repro
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Sep 25, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    06a007c View commit details
Showing with 118 additions and 0 deletions.
  1. +17 −0 hrtime-repro/index.js
  2. +84 −0 hrtime-repro/package-lock.json
  3. +16 −0 hrtime-repro/package.json
  4. +1 −0 hrtime-repro/repro.sh
17 changes: 17 additions & 0 deletions hrtime-repro/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { hrTime } = require("@opentelemetry/core");

function check(t) {
if (!Number.isInteger(t[0]) || !Number.isInteger(t[1])) {
throw new RangeError(
`Got non-int hrTime: ${t}, timeorigin=${
performance.timeOrigin
}, now=${performance.now()}`
);
}
}

for (let i = 0; i < 50_000; ++i) {
const t = hrTime();
console.log(t, performance.now());
check(t);
}
84 changes: 84 additions & 0 deletions hrtime-repro/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions hrtime-repro/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "hrtime-repro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@opentelemetry/sdk-metrics": "1.8.0",
"@opentelemetry/core": "1.8.0"
}
}
1 change: 1 addition & 0 deletions hrtime-repro/repro.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
while (node index.js) do :; done