@agoric/internal
Advanced tools
Comparing version 0.1.1-dev-9ba7842.0 to 0.1.1-dev-a1dedea.0
{ | ||
"name": "@agoric/internal", | ||
"version": "0.1.1-dev-9ba7842.0+9ba7842", | ||
"version": "0.1.1-dev-a1dedea.0+a1dedea", | ||
"description": "Externally unsupported utilities internal to agoric-sdk", | ||
@@ -21,8 +21,8 @@ "type": "module", | ||
"dependencies": { | ||
"@endo/eventual-send": "^0.16.3", | ||
"@endo/marshal": "^0.7.3", | ||
"@endo/promise-kit": "^0.2.47" | ||
"@endo/eventual-send": "^0.16.4", | ||
"@endo/marshal": "^0.7.4", | ||
"@endo/promise-kit": "^0.2.48" | ||
}, | ||
"devDependencies": { | ||
"@endo/init": "^0.5.47", | ||
"@endo/init": "^0.5.48", | ||
"ava": "^4.3.1" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "9ba78424a4bd587d0009a6816b7ffcedd5d7f972" | ||
"gitHead": "a1dedeae72908fda45afcb6038d76f8359adc8de" | ||
} |
// @ts-check | ||
export * from './utils.js'; | ||
export * from './config.js'; |
@@ -208,1 +208,19 @@ // @ts-check | ||
}; | ||
/** | ||
* Returns a function that uses a millisecond-based time-since-epoch capability | ||
* (such as `performance.now`) to measure execution time of an async function | ||
* and report the result in seconds to match our telemetry standard. | ||
* | ||
* @param {typeof import('perf_hooks').performance.now} currentTimeMillisec | ||
* @returns {<T>(fn: () => Promise<T>) => Promise<{ result: T, duration: number }>} | ||
*/ | ||
export const makeMeasureSeconds = currentTimeMillisec => { | ||
const measureSeconds = async fn => { | ||
const t0 = currentTimeMillisec(); | ||
const result = await fn(); | ||
const durationMillisec = currentTimeMillisec() - t0; | ||
return { result, duration: durationMillisec / 1000 }; | ||
}; | ||
return measureSeconds; | ||
}; |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
22139
6
239
Updated@endo/eventual-send@^0.16.4
Updated@endo/marshal@^0.7.4
Updated@endo/promise-kit@^0.2.48