cincamipd/src/main/java/org/ciedayap/ipd/utils/Sample.java
public static ArrayList simulation2(int maxNofProjects) throws ProcessingException, Exception            
    {
        if(maxNofProjects<10) throw new ProcessingException("The max number of projects must be 10 at least.");
        if((maxNofProjects%10)!=0) throw new ProcessingException("The max number of projects must be a multiple of 10.");
        
        System.out.println("Individual Times - To Vary the Number of projects between [1;"+maxNofProjects+"]");
        System.out.println("Starting simulation 2 ["+ZonedDateTime.now()+"]...");
        ArrayList results=new ArrayList();
        long start=System.nanoTime();        

        ArrayList titles=new ArrayList();
        titles.add("#Projects");
        titles.add("Datetime");
        titles.add("Elapsed (ns)");
        titles.add("BriefPD generation time (ns)");
        titles.add("BriefPD message size (bytes)");
        titles.add("BriefPD compression time (ns)");
        titles.add("BriefPD compressed size (bytes)");
        titles.add("BriefPD decompression time (ns)");
        titles.add("BriefPD regeneration time (ns)");   
        titles.add("BriefPD Equal operation time (ns)");
        titles.add("BriefPD Equal Result (boolean)");
        titles.add("BriefPD findDifferences operation time (ns)");   
        titles.add("XML generation time (ns)");
        titles.add("XML message size (Bytes)");
        titles.add("XML compression time (ns)");
        titles.add("XML compressed size (Bytes)");
        titles.add("XML decompression time (ns)");        
        titles.add("XML regeneration time (ns)");        
        titles.add("JSON generation time (ns)");
        titles.add("JSON message size (Bytes)");
        titles.add("JSON compression time (ns)");
        titles.add("JSON compressed size (Bytes)");
        titles.add("JSON decompression time (ns)");        
        titles.add("JSON regeneration time (ns)");        
        results.add(titles);
        
        for(int i=10;i<=maxNofProjects;i+=10)
        {
            System.out.println("["+i+"] "+ZonedDateTime.now());
            IPD message=generateIPDMessage(i,i);//ID, #Projects
            
            results.add(Sample.measureIndividualTime(start, message));
            
            message.realeaseResources();
            System.gc();
            Thread.sleep(1000);
        }
        
        System.out.println("Finishing simulation 2 ["+ZonedDateTime.now()+"]...");        
        
        return results;        
    }
/**
     * It simulates the individual operation time, varying the number of projects per message (from 1 to maxNofProjects)
     * @param maxNofProjects The max number of projects per message throughout the simulation. It must be a multiple of 10.
     * @return An ArrayList with the records of the simulation with the following fields:
     *  1. #Projects: Number of measurement projects per message
     *  2. Datetime: Timestamp when the measures are taken
     *  3. Elapsed (ns): Elapsed time in nanoseconds from the simulation beggining
     *  4. BriefPD generation time (ns): Generation time for the BriefPD data format
     *  5. BriefPD message size (bytes): Size of the BriefPD message
     *  6. BriefPD compression time (ns): Compresssion time using GZIP for the BriefPD message
     *  7. BriefPD compressed size (bytes): Compressed size for the BriefPD message
     *  8. BriefPD decompression time (ns): Decompression time using GZIP for the BriefPD messsage
     *  9. BriefPD regeneration time (ns): Consumed time in regenerating the object model from the BriefPD message
     *  10. BriefPD Equal operation time (ns): Consumed time by the equal operation in BriefPD
     *  11. BriefPD Equal Result (boolean): Boolean result of the equal operation in BriefPD
     *  12. BriefPD findDifferences operation time (ns): Individual operation time of findDifferences, when some data at the lowest level of the hierarchy is modified
     *  13. XML generation time (ns): Generation time for the XML data format
     *  14. XML message size (Bytes): Size of the XML message
     *  15. XML compression time (ns): Compression time for the XML message
     *  16. XML compressed size (Bytes): Compressed size for the XML message
     *  17. XML decompression time (ns): Decompression time for the XML message
     *  18. JSON generation time (ns): Generation time for the JSON message
     *  19. JSON Message size (Bytes): Message size for the JSON message
     *  20. JSON compression time (ns): Compression time for the JSON message
     *  21. JSON compressed size (Bytes): Compressed size for the JSON message
     *  22. JSON decompression time (ns): Decompression time for the JSON message
     * 
     * @throws ProcessingException It is raised when a) Simulation time is lesser than 1 minute
     * @throws Exception 
     */
It simulates the individual operation time, varying the number of projects per message (from 1 to maxNofProjects)
@param maxNofProjects The max number of projects per message throughout the simulation. It must be a multiple of 10.
@return An ArrayList with the records of the simulation with the following fields:
1. #Projects: Number of measurement projects per message
2. Datetime: Timestamp when the measures are taken
3. Elapsed (ns): Elapsed time in nanoseconds from the simulation beggining
4. BriefPD generation time (ns): Generation time for the BriefPD data format
5. BriefPD message size (bytes): Size of the BriefPD message
6. BriefPD compression time (ns): Compresssion time using GZIP for the BriefPD message
7. BriefPD compressed size (bytes): Compressed size for the BriefPD message
8. BriefPD decompression time (ns): Decompression time using GZIP for the BriefPD messsage
9. BriefPD regeneration time (ns): Consumed time in regenerating the object model from the BriefPD message
10. BriefPD Equal operation time (ns): Consumed time by the equal operation in BriefPD
11. BriefPD Equal Result (boolean): Boolean result of the equal operation in BriefPD
12. BriefPD findDifferences operation time (ns): Individual operation time of findDifferences, when some data at the lowest level of the hierarchy is modified
13. XML generation time (ns): Generation time for the XML data format
14. XML message size (Bytes): Size of the XML message
15. XML compression time (ns): Compression time for the XML message
16. XML compressed size (Bytes): Compressed size for the XML message
17. XML decompression time (ns): Decompression time for the XML message
18. JSON generation time (ns): Generation time for the JSON message
19. JSON Message size (Bytes): Message size for the JSON message
20. JSON compression time (ns): Compression time for the JSON message
21. JSON compressed size (Bytes): Compressed size for the JSON message
22. JSON decompression time (ns): Decompression time for the JSON message

@throws ProcessingException It is raised when a) Simulation time is lesser than 1 minute
@throws Exception
It simulates the individual operation time varying the number of projects per message ( from 1 to maxNofProjects ) @param maxNofProjects The max number of projects per message throughout the simulation . It must be a multiple of 10 . @return An ArrayList with the records of the simulation with the following fields : 1 . #Projects : Number of measurement projects per message 2 . Datetime : Timestamp when the measures are taken 3 . Elapsed ( ns ) : Elapsed time in nanoseconds from the simulation beggining 4 . BriefPD generation time ( ns ) : Generation time for the BriefPD data format 5 . BriefPD message size ( bytes ) : Size of the BriefPD message 6 . BriefPD compression time ( ns ) : Compresssion time using GZIP for the BriefPD message 7 . BriefPD compressed size ( bytes ) : Compressed size for the BriefPD message 8 . BriefPD decompression time ( ns ) : Decompression time using GZIP for the BriefPD messsage 9 . BriefPD regeneration time ( ns ) : Consumed time in regenerating the object model from the BriefPD message 10 . BriefPD Equal operation time ( ns ) : Consumed time by the equal operation in BriefPD 11 . BriefPD Equal Result ( boolean ) : Boolean result of the equal operation in BriefPD 12 . BriefPD findDifferences operation time ( ns ) : Individual operation time of findDifferences when some data at the lowest level of the hierarchy is modified 13 . XML generation time ( ns ) : Generation time for the XML data format 14 . XML message size ( Bytes ) : Size of the XML message 15 . XML compression time ( ns ) : Compression time for the XML message 16 . XML compressed size ( Bytes ) : Compressed size for the XML message 17 . XML decompression time ( ns ) : Decompression time for the XML message 18 . JSON generation time ( ns ) : Generation time for the JSON message 19 . JSON Message size ( Bytes ) : Message size for the JSON message 20 . JSON compression time ( ns ) : Compression time for the JSON message 21 . JSON compressed size ( Bytes ) : Compressed size for the JSON message 22 . JSON decompression time ( ns ) : Decompression time for the JSON message @throws ProcessingException It is raised when a ) Simulation time is lesser than 1 minute @throws Exception
public static ArrayList simulation2(int maxNofProjects) throws ProcessingException, Exception            
    {
        if(maxNofProjects<10) throw new ProcessingException("The max number of projects must be 10 at least.");
        if((maxNofProjects%10)!=0) throw new ProcessingException("The max number of projects must be a multiple of 10.");
        System.out.println("Individual Times - To Vary the Number of projects between [1;"+maxNofProjects+"]");
        System.out.println("Starting simulation 2 ["+ZonedDateTime.now()+"]...");
        ArrayList results=new ArrayList();
        long start=System.nanoTime();        
        ArrayList titles=new ArrayList();
        titles.add("#Projects");
        titles.add("Datetime");
        titles.add("Elapsed (ns)");
        titles.add("BriefPD generation time (ns)");
        titles.add("BriefPD message size (bytes)");
        titles.add("BriefPD compression time (ns)");
        titles.add("BriefPD compressed size (bytes)");
        titles.add("BriefPD decompression time (ns)");
        titles.add("BriefPD regeneration time (ns)");   
        titles.add("BriefPD Equal operation time (ns)");
        titles.add("BriefPD Equal Result (boolean)");
        titles.add("BriefPD findDifferences operation time (ns)");   
        titles.add("XML generation time (ns)");
        titles.add("XML message size (Bytes)");
        titles.add("XML compression time (ns)");
        titles.add("XML compressed size (Bytes)");
        titles.add("XML decompression time (ns)");        
        titles.add("XML regeneration time (ns)");        
        titles.add("JSON generation time (ns)");
        titles.add("JSON message size (Bytes)");
        titles.add("JSON compression time (ns)");
        titles.add("JSON compressed size (Bytes)");
        titles.add("JSON decompression time (ns)");        
        titles.add("JSON regeneration time (ns)");        
        results.add(titles);
        for(int i=10;i<=maxNofProjects;i+=10)
        {
            System.out.println("["+i+"] "+ZonedDateTime.now());
            IPD message=generateIPDMessage(i,i);
            results.add(Sample.measureIndividualTime(start, message));
            message.realeaseResources();
            System.gc();
            Thread.sleep(1000);
        }
        System.out.println("Finishing simulation 2 ["+ZonedDateTime.now()+"]...");        
        return results;        
    }
public static ArrayList simulation2 ( int maxNofProjects ) throws ProcessingException , Exception { if ( maxNofProjects < 10 ) throw new ProcessingException ( "The max number of projects must be 10 at least." ) ; if ( ( maxNofProjects % 10 ) != 0 ) throw new ProcessingException ( "The max number of projects must be a multiple of 10." ) ; System . out . println ( "Individual Times - To Vary the Number of projects between [1;" + maxNofProjects + "]" ) ; System . out . println ( "Starting simulation 2 [" + ZonedDateTime . now ( ) + "]..." ) ; ArrayList results = new ArrayList ( ) ; long start = System . nanoTime ( ) ; ArrayList titles = new ArrayList ( ) ; titles . add ( "#Projects" ) ; titles . add ( "Datetime" ) ; titles . add ( "Elapsed (ns)" ) ; titles . add ( "BriefPD generation time (ns)" ) ; titles . add ( "BriefPD message size (bytes)" ) ; titles . add ( "BriefPD compression time (ns)" ) ; titles . add ( "BriefPD compressed size (bytes)" ) ; titles . add ( "BriefPD decompression time (ns)" ) ; titles . add ( "BriefPD regeneration time (ns)" ) ; titles . add ( "BriefPD Equal operation time (ns)" ) ; titles . add ( "BriefPD Equal Result (boolean)" ) ; titles . add ( "BriefPD findDifferences operation time (ns)" ) ; titles . add ( "XML generation time (ns)" ) ; titles . add ( "XML message size (Bytes)" ) ; titles . add ( "XML compression time (ns)" ) ; titles . add ( "XML compressed size (Bytes)" ) ; titles . add ( "XML decompression time (ns)" ) ; titles . add ( "XML regeneration time (ns)" ) ; titles . add ( "JSON generation time (ns)" ) ; titles . add ( "JSON message size (Bytes)" ) ; titles . add ( "JSON compression time (ns)" ) ; titles . add ( "JSON compressed size (Bytes)" ) ; titles . add ( "JSON decompression time (ns)" ) ; titles . add ( "JSON regeneration time (ns)" ) ; results . add ( titles ) ; for ( int i = 10 ; i <= maxNofProjects ; i += 10 ) { System . out . println ( "[" + i + "] " + ZonedDateTime . now ( ) ) ; IPD message = generateIPDMessage ( i , i ) ; results . add ( Sample . measureIndividualTime ( start , message ) ) ; message . realeaseResources ( ) ; System . gc ( ) ; Thread . sleep ( 1000 ) ; } System . out . println ( "Finishing simulation 2 [" + ZonedDateTime . now ( ) + "]..." ) ; return results ; }
It simulates the individual operation time, varying the number of projects per message (from 1 to maxNofProjects)
 @param maxNofProjects The max number of projects per message throughout the simulation.
It simulates the individual operation time varying the number of projects per message ( from 1 to maxNofProjects ) @param maxNofProjects The max number of projects per message throughout the simulation .
//ID, #Projects