Package profiler

Examples of profiler.ProfileKB


  private static Release getCurrentRelease() throws IOException
  {
    Release current = new Release();

    ProfileKB pkb = new ProfileKB();
    pkb.setMemoryProfiling(MemoryProfiling.ALL_SIZE);
    pkb.setLoaderType(LOADER);
    pkb.setTask(TASK);

    //Get all the results for the current release
    Map<String, List<Result<Task>>> results = new LinkedHashMap<String, List<Result<Task>>>();
    BufferedReader reader = new BufferedReader(new FileReader(ONTOLOGIES));   
    String line;
   
    while((line = reader.readLine()) != null)
    {
      if(line.trim().length() == 0)
        continue;
     
      String[] files = line.split( " " );
      String name = new File(files[0]).getName();

      if(WARMUP)
      {
        //Get the estimated time for this test
        double estimatedTime = 0;
        for(Result<Task> result: pkb.profile( files ))
          estimatedTime+=result.getAvgTime();

        //Get the number of warmup iterations to perform, based on the estimated time
        int nWarmupIterations = getNumberOfWarmupIterations(estimatedTime)-1;

        //Warmup
        for(int i=0; i<nWarmupIterations; i++)
          pkb.profile( files );
      }

      for(int i=0; i<ITERATIONS; i++)
      {
        List<Result<Task>> res = new ArrayList<Result<Task>>(pkb.profile( files ));
        List<Result<Task>> previousRes = results.get(name);
        if(previousRes == null)
          results.put(name, res);
        else
        {
View Full Code Here

TOP

Related Classes of profiler.ProfileKB

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.