X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmodification%2FMutableCompositeModificationTest.java;h=7fac06c0f89d77ba51499c1d35d50948681eee5a;hp=e2acaa8d10789d2d1e1f2b5a6f127b5a1c7a3d9a;hb=7ec296abdea94bbdc336276731ee545a2fb13e7c;hpb=2a735bfd69e79cfcf0cbd08d4596e48e3cc1069c diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModificationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModificationTest.java index e2acaa8d10..7fac06c0f8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModificationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModificationTest.java @@ -1,11 +1,17 @@ +/* + * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + package org.opendaylight.controller.cluster.datastore.modification; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import com.google.common.base.Optional; -import com.google.common.base.Stopwatch; import org.apache.commons.lang.SerializationUtils; -import org.junit.Ignore; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; @@ -72,35 +78,4 @@ public class MutableCompositeModificationTest extends AbstractModificationTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, delete.getVersion()); assertEquals("getPath", deletePath, delete.getPath()); } - - @Test - @Ignore - public void testSerializationScale() throws Exception { - YangInstanceIdentifier writePath = TestModel.TEST_PATH; - NormalizedNode writeData = ImmutableContainerNodeBuilder.create().withNodeIdentifier( - new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)). - withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")).build(); - - MutableCompositeModification compositeModification = new MutableCompositeModification(); - for(int i = 0; i < 1000; i++) { - compositeModification.addModification(new WriteModification(writePath, writeData)); - } - - Stopwatch sw = Stopwatch.createStarted(); - for(int i = 0; i < 1000; i++) { - new ModificationPayload(compositeModification); - } - - sw.stop(); - System.out.println("Elapsed: "+sw); - - ModificationPayload p = new ModificationPayload(compositeModification); - sw.start(); - for(int i = 0; i < 1000; i++) { - p.getModification(); - } - - sw.stop(); - System.out.println("Elapsed: "+sw); - } }