Skip to content

Commit

Permalink
fix: restore exports of non-public perf functions in runtime package (#…
Browse files Browse the repository at this point in the history
…515)

Fixes #514
  • Loading branch information
chrispcampbell authored Aug 21, 2024
1 parent 035c39d commit 14bb055
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
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'

0 comments on commit 14bb055

Please sign in to comment.