Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore exports of non-public perf functions in runtime package #515

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/runtime/src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2024 Climate Interactive / New Venture Fund

import { describe, expect, it } from 'vitest'

import { perfNow, perfElapsed } from './index'

describe('non-public perf functions', () => {
it('should be exported', () => {
// The `perf` functions are not officially part of the public API, but they should be
// exported for use in experimental tools, so we verify that they are accessible as
// top-level exports
const t0 = perfNow()
const elapsed = perfElapsed(t0)
expect(elapsed).toBeDefined()
})
})
3 changes: 3 additions & 0 deletions packages/runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ export * from './js-model'
export * from './wasm-model'
export * from './model-runner'
export * from './model-scheduler'

/** @hidden The `perf` module is not part of the public API, but is exposed for use in performance tools. */
export * from './perf'