@@ -0,0 +1,2083 @@
+package org.epics.pvmanager.tests;%0D%0A%0D%0A/*%0D%0A * Copyright 2011 Brookhaven National Laboratory%0D%0A * All rights reserved. Use is subject to license terms.%0D%0A */%0D%0A%0D%0A%0D%0Aimport org.epics.pvmanager.PVManager;%0D%0Aimport org.epics.pvmanager.PVReader;%0D%0Aimport org.epics.pvmanager.jca.JCADataSource;%0D%0Aimport static org.epics.pvmanager.ExpressionLanguage.*;%0D%0Aimport org.epics.pvmanager.PVReaderListener;%0D%0Aimport org.epics.pvmanager.data.VDoubleArray;%0D%0Aimport org.epics.pvmanager.data.VShortArray;%0D%0Aimport static org.epics.pvmanager.util.TimeDuration.*;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author carcassi%0D%0A */%0D%0Apublic class JCALargeArrays %7B%0D%0A   static     long  start = System.currentTimeMillis();%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        System.setProperty(%22com.cosylab.epics.caj.CAJContext.max_array_bytes%22, %2220000000%22);%0D%0A//        System.setProperty(%22gov.aps.jca.jni.JNIContext.max_array_bytes%22, %2210000000%22);%0D%0A        JCADataSource source = new JCADataSource();%0D%0A        source.getContext().printInfo();%0D%0A        PVManager.setDefaultDataSource(source);%0D%0A        final PVReader%3CObject%3E pv = PVManager.read(channel(%22carcassi:compressExample%22)).every(hz(50));%0D%0A        pv.addPVReaderListener(new PVReaderListener() %7B%0D%0A%0D%0A            @Override%0D%0A            public void pvChanged() %7B%0D%0A                long pause = System.currentTimeMillis() - start;%0D%0A                start = System.currentTimeMillis();%0D%0A                if (pv.getValue() instanceof VShortArray)%0D%0A                    System.out.println(pause + %22 ms - %22 + pv.getValue() + %22 - count %22 + ((VShortArray) pv.getValue()).getArray().length);%0D%0A                else if (pv.getValue() instanceof VDoubleArray)%0D%0A                    System.out.println(pause + %22 ms - %22 + pv.getValue() + %22 - count %22 + ((VDoubleArray) pv.getValue()).getArray().length);%0D%0A                else%0D%0A                    System.out.println(pause + %22 ms - %22 + pv.getValue());%0D%0A                Exception ex = pv.lastException();%0D%0A                if (ex != null) %7B%0D%0A                    ex.printStackTrace();%0D%0A                %7D%0D%0A                  %0D%0A            %7D%0D%0A        %7D);%0D%0A    %7D%0D%0A%7D%0D%0A

Add test for benchmarking large JCA array.