1 23 24 25 package org.objectweb.clif.analyser.lib; 26 27 import java.io.*; 28 import org.objectweb.clif.storage.api.StorageRead; 29 import org.objectweb.clif.storage.api.ActionEvent; 30 import org.objectweb.clif.analyser.Concat; 31 import java.util.*; 32 33 34 42 public class ConsoleFileStorageImpl 43 extends org.objectweb.clif.storage.lib.filestorage.ConsoleFileStorageImpl 44 implements StorageRead 45 { 46 50 51 public void collect() 52 { 53 super.collect(); 54 try 55 { 56 makeArchive(); 57 } 58 catch (Exception ex) 59 { 60 throw new RuntimeException ("Could not make the archive.clif file", ex); 61 } 62 } 63 64 65 69 private void makeArchive() 70 { 71 String [] names = new String [100]; 72 Vector files = new Vector() ; 73 int max = 10000000; String homeDir = testDirbase + File.separator + testId + File.separator; 75 names = new File(homeDir).list(); 76 for(int i=0; i<names.length; i++) 77 { 78 String filename = homeDir + names[i] + File.separator + ActionEvent.EVENT_TYPE_LABEL; 79 if (new File(filename).exists()) 80 { 81 files.add(filename); 82 } 83 } 84 String out = homeDir + "archive.clif"; 85 Concat concat = new Concat(files, max, out) ; 86 concat.concatAllFiles() ; 87 } 88 89 90 94 95 109 public void getView(String nameOfTheView,String testId,String nameOfInjector,int numthread,int paramX,int paramY,long begindate, long enddate) 110 { 111 } 113 } 114 | Popular Tags |