feat(benchmark): make view cache a parameter to the tree benchmark
This commit is contained in:
@ -13,7 +13,7 @@ export const VIEW_POOL_CAPACITY = 'ViewFactory.viewPoolCapacity';
|
||||
@Injectable()
|
||||
export class ViewFactory {
|
||||
_poolCapacityPerProtoView:number;
|
||||
_pooledViewsPerProtoView:Map<vieModule.ProtoView, List<viewModule.AppView>>;
|
||||
_pooledViewsPerProtoView:Map<viewModule.AppProtoView, List<viewModule.AppView>>;
|
||||
|
||||
constructor(@Inject(VIEW_POOL_CAPACITY) poolCapacityPerProtoView) {
|
||||
this._poolCapacityPerProtoView = poolCapacityPerProtoView;
|
||||
|
@ -27,7 +27,6 @@ export function main() {
|
||||
describe('caching', () => {
|
||||
|
||||
it('should support multiple AppProtoViews', () => {
|
||||
var capacity;
|
||||
var pv1 = createPv();
|
||||
var pv2 = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
@ -41,7 +40,6 @@ export function main() {
|
||||
});
|
||||
|
||||
it('should reuse the newest view that has been returned', () => {
|
||||
var capacity;
|
||||
var pv = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
var view1 = vf.getView(pv);
|
||||
@ -53,7 +51,6 @@ export function main() {
|
||||
});
|
||||
|
||||
it('should not add views when the capacity has been reached', () => {
|
||||
var capacity;
|
||||
var pv = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
var view1 = vf.getView(pv);
|
||||
|
@ -29,7 +29,6 @@ export function main() {
|
||||
describe('caching', () => {
|
||||
|
||||
it('should support multiple RenderProtoViews', () => {
|
||||
var capacity;
|
||||
var pv1 = createPv();
|
||||
var pv2 = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
@ -43,7 +42,6 @@ export function main() {
|
||||
});
|
||||
|
||||
it('should reuse the newest view that has been returned', () => {
|
||||
var capacity;
|
||||
var pv = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
var view1 = vf.getView(pv);
|
||||
@ -55,7 +53,6 @@ export function main() {
|
||||
});
|
||||
|
||||
it('should not add views when the capacity has been reached', () => {
|
||||
var capacity;
|
||||
var pv = createPv();
|
||||
var vf = createViewFactory({ capacity: 2 });
|
||||
var view1 = vf.getView(pv);
|
||||
|
Reference in New Issue
Block a user