Skip to content

Commit ced65a7

Browse files
Merge pull request #169 from preactjs/benchmarks
Add some simple Benchmarks
2 parents c035e86 + 7a83188 commit ced65a7

File tree

10 files changed

+15150
-449
lines changed

10 files changed

+15150
-449
lines changed

benchmarks/index.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { h } from 'preact';
2+
import Suite from 'benchmarkjs-pretty';
3+
import renderToString from '../src/index';
4+
import TextApp from './text';
5+
// import StackApp from './stack';
6+
import { App as IsomorphicSearchResults } from './isomorphic-ui-search-results';
7+
8+
new Suite('Bench')
9+
.add('Text', () => {
10+
return renderToString(<TextApp />);
11+
})
12+
.add('SearchResults', () => {
13+
return renderToString(<IsomorphicSearchResults />);
14+
})
15+
// TODO: Enable this once we switched away from recursion
16+
// .add('Stack Depth', () => {
17+
// return renderToString(<StackApp />);
18+
// })
19+
.run();

0 commit comments

Comments
 (0)