Changeset 2568
- Timestamp:
- Aug 22, 2006, 2:22:13 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/styles.css
r2525 r2568 30 30 } 31 31 32 td {32 td, th { 33 33 font-family: verdana, arial, sans-serif; 34 34 font-size: 10pt; … … 165 165 .red { 166 166 background: #FF0000; 167 xborder: 1px solid #000000;168 167 width: 20px; 169 168 text-align: center; … … 172 171 .yellow { 173 172 background: #FFFF00; 174 xborder: 1px solid #000000;175 173 width: 20px; 176 174 text-align: center; … … 179 177 .green { 180 178 background: #00FF00; 181 xborder: 1px solid #000000;182 179 width: 20px; 183 180 text-align: center; 184 181 font-weight: bold; 185 182 } 183 184 table.listing { 185 border: 1px solid #999999; 186 width: 100%; 187 } 188 table.listing tr { 189 vertical-align: top; 190 } 191 table.listing th { 192 text-align: left; 193 background: #E0E0E0; 194 border-bottom: 1px solid #999999; 195 } 196 table.listing tr.oddrow { 197 } 198 table.listing tr.evenrow, .shaded { 199 background: #E0E0E0; 200 } 201 202 203 -
trunk/src/test/net/sf/basedb/test/TestUtil.java
r2314 r2568 24 24 package net.sf.basedb.test; 25 25 26 import java.io.FileWriter; 27 import java.io.Writer; 26 28 import java.net.InetAddress; 27 29 … … 50 52 private static String client = "net.sf.basedb.clients.test"; 51 53 private static SessionControl sc = null; 54 private static Writer memoryLog = null; 55 private static long startTime = 0; 56 private static Runtime runtime = Runtime.getRuntime(); 52 57 53 58 /** 54 59 Start the testing. Starts BASE and creates a SessionControl. 55 60 */ 56 public static void begin( )61 public static void begin(boolean logMemoryUsage) 57 62 { 58 63 if (Application.isRunning()) return; … … 60 65 { 61 66 write("++Starting BASE..."); 62 Application.start(); 67 if (logMemoryUsage) 68 { 69 memoryLog = new FileWriter("memory.log"); 70 memoryLog.write("Time (ms)\tTotal\tFree\tUsed\n"); 71 startTime = System.currentTimeMillis(); 72 } 73 Application.start(false); 63 74 sc = Application.newSessionControl(client, getLocalIp(), null); 64 75 write("done.\n"); … … 83 94 if (sc != null && sc.isLoggedIn()) sc.logout(); 84 95 Application.stop(); 96 if (memoryLog != null) memoryLog.close(); 85 97 write("done.\n"); 86 98 } … … 96 108 public static SessionControl getSessionControl() 97 109 { 98 if (sc == null) begin( );110 if (sc == null) begin(false); 99 111 return sc; 100 112 } … … 105 117 public static DbControl getDbControl() 106 118 { 119 if (memoryLog != null) 120 { 121 try 122 { 123 long time = System.currentTimeMillis() - startTime; 124 long total = runtime.totalMemory(); 125 long free = runtime.freeMemory(); 126 long used = total - free; 127 memoryLog.write(time + "\t" + total +"\t"+free+"\t"+used+"\n"); 128 memoryLog.flush(); 129 } 130 catch (Throwable t) 131 {} 132 } 107 133 return getSessionControl().newDbControl(); 108 134 } -
trunk/src/test/net/sf/basedb/test/roles/AnalysisTest.java
r2314 r2568 176 176 job.setParameterValue("delta", new FloatParameterType(), 0.1f); 177 177 job.setParameterValue("iter", new IntegerParameterType(), 4); 178 job.setParameterValue("blockGroup", new IntegerParameterType(), 1 00);178 job.setParameterValue("blockGroup", new IntegerParameterType(), 1); 179 179 180 180 dc.saveItem(job); -
trunk/src/test/net/sf/basedb/test/roles/PowerUserTest.java
r2548 r2568 120 120 Protocol printing = createProtocol(dc, "Printing A", ProtocolType.PRINTING); 121 121 122 Hardware hybStation = createHardware(dc, "Hybridization station A", HardwareType.HYBRIDIZATION_STATION); 122 123 Hardware robot = createHardware(dc, "Print robot A", HardwareType.PRINT_ROBOT); 123 124 Hardware scanner = createHardware(dc, "Scanner A", HardwareType.SCANNER); … … 167 168 dc = TestUtil.getDbControl(); 168 169 ArrayDesign design = createArrayDesign(dc, "Array design A"); 170 dc.commit(); 171 172 importFeatures(printMapImporter, printMap, design); 173 174 dc = TestUtil.getDbControl(); 169 175 ArrayBatch batch = createArrayBatch(dc, "Array batch A", design, robot, printing); 170 176 ArraySlide slide1 = createArraySlide(dc, "Array slide A.1", batch, 1); 171 177 ArraySlide slide2 = createArraySlide(dc, "Array slide A.2", batch, 2); 172 dc.commit(); 173 174 importFeatures(printMapImporter, printMap, design); 178 ArraySlide slide3 = createArraySlide(dc, "Array slide A.3", batch, 3); 179 ArraySlide slide4 = createArraySlide(dc, "Array slide A.4", batch, 4); 180 dc.commit(); 181 175 182 TestUtil.logout(); 176 183 } … … 450 457 parameters.put("dataSplitterRegexp", "\\t"); 451 458 parameters.put("ignoreRegexp", ".*(NoOligoInfo|no clone).*"); 452 parameters.put("dataHeaderRegexp", "\"Block\"\\t\"Column\"\\t\"Row\"\\t\"Name\"\\t\"ID\".*"); 459 if (dyeSwap) 460 { 461 parameters.put("dataHeaderRegexp", "\"Block\"\\t\"Column\"\\t\"Row\"\\t\"Name\"\\t\"ID\".*\"Ratio of Medians \\(635\\/532\\)\".*"); 462 } 463 else 464 { 465 parameters.put("dataHeaderRegexp", "\"Block\"\\t\"Column\"\\t\"Row\"\\t\"Name\"\\t\"ID\".*\"Ratio of Medians \\(532\\/635\\)\".*"); 466 } 453 467 parameters.put("minDataColumns", 48); 454 468 parameters.put("maxDataColumns", 48); -
trunk/src/test/net/sf/basedb/test/roles/Run.java
r2259 r2568 44 44 Set<String> cmds = new HashSet<String>(Arrays.asList(args)); 45 45 boolean all = cmds.contains("all"); 46 boolean logMemoryUsage = cmds.contains("-m"); 46 47 47 48 int tests = 0; … … 49 50 if (ok && (all || cmds.contains("root"))) 50 51 { 51 TestUtil.begin( );52 TestUtil.begin(logMemoryUsage); 52 53 ok = RootTest.run(); 53 54 tests++; … … 55 56 if (ok && (all || cmds.contains("admin"))) 56 57 { 57 TestUtil.begin( );58 TestUtil.begin(logMemoryUsage); 58 59 ok = AdminTest.run(); 59 60 tests++; … … 61 62 if (ok && (all || cmds.contains("power"))) 62 63 { 63 TestUtil.begin( );64 TestUtil.begin(logMemoryUsage); 64 65 ok = PowerUserTest.run(); 65 66 tests++; … … 67 68 if (ok && (all || cmds.contains("user"))) 68 69 { 69 TestUtil.begin( );70 TestUtil.begin(logMemoryUsage); 70 71 ok = UserTest.run(); 71 72 tests++; … … 73 74 if (ok && (all || cmds.contains("guest"))) 74 75 { 75 TestUtil.begin( );76 TestUtil.begin(logMemoryUsage); 76 77 ok = GuestTest.run(); 77 78 tests++; … … 89 90 { 90 91 TestUtil.write( 91 "test.sh roles <cmds>\n" + 92 "test.sh roles [-m] <cmds>\n" + 93 " -m = log memory usage to file memory.log\n" + 92 94 " cmds = list of tests to run; all, root, admin, power, user, guest\n\n"); 93 95 -
trunk/src/test/net/sf/basedb/test/roles/UserTest.java
r2548 r2568 92 92 Extract eRef = createExtract(dc, "Extract A.ref", sRef); 93 93 94 LabeledExtract le1 = createLabeledExtract(dc, "Labeled extract A.00h", e1, "cy3"); 95 LabeledExtract le2 = createLabeledExtract(dc, "Labeled extract A.24h", e2, "cy3"); 96 LabeledExtract leRef = createLabeledExtract(dc, "Labeled extract A.ref", eRef, "cy5"); 94 Label cy3 = Util.findLabel(dc, "cy3"); 95 Label cy5 = Util.findLabel(dc, "cy5"); 96 LabeledExtract le1 = createLabeledExtract(dc, "Labeled extract A.00h", e1, cy3); 97 LabeledExtract le2 = createLabeledExtract(dc, "Labeled extract A.24h", e2, cy3); 98 LabeledExtract leRef = createLabeledExtract(dc, "Labeled extract A.ref", eRef, cy5); 99 LabeledExtract le1DyeSwap = createLabeledExtract(dc, "Labeled extract A.00h (dye-swap)", e1, cy5); 100 LabeledExtract le2DyeSwap = createLabeledExtract(dc, "Labeled extract A.24h (dye-swap)", e2, cy5); 101 LabeledExtract leRefDyeSwap = createLabeledExtract(dc, "Labeled extract A.ref (dye-swap)", eRef, cy3); 97 102 dc.commit(); 98 103 … … 101 106 Hybridization h1 = createHybridization(dc, "Hybridization A.00h", "Array slide A.1", le1, leRef); 102 107 Hybridization h2 = createHybridization(dc, "Hybridization A.24h", "Array slide A.2", le2, leRef); 108 Hybridization h1DyeSwap = createHybridization(dc, "Hybridization A.00h (dye-swap)", "Array slide A.3", le1, leRef); 109 Hybridization h2DyeSwap = createHybridization(dc, "Hybridization A.24h (dye-swap)", "Array slide A.4", le2, leRef); 103 110 104 111 Scan sc1 = createScan(dc, "Scan A.00h", h1); 105 112 Scan sc2 = createScan(dc, "Scan A.24h", h2); 113 Scan sc1DyeSwap = createScan(dc, "Scan A.00h (dye-swap)", h1DyeSwap); 114 Scan sc2DyeSwap = createScan(dc, "Scan A.24h (dye-swap)", h2DyeSwap); 106 115 107 116 // Images … … 111 120 RawBioAssay rba1 = createRawBioAssay(dc, "Raw bioassay A.00h", sc1); 112 121 RawBioAssay rba2 = createRawBioAssay(dc, "Raw bioassay A.24h", sc2); 113 RawBioAssay rba1DyeSwap = createRawBioAssay(dc, "Raw bioassay A.00h (dye-swap)", sc1 );114 RawBioAssay rba2DyeSwap = createRawBioAssay(dc, "Raw bioassay A.24h (dye-swap)", sc2 );122 RawBioAssay rba1DyeSwap = createRawBioAssay(dc, "Raw bioassay A.00h (dye-swap)", sc1DyeSwap); 123 RawBioAssay rba2DyeSwap = createRawBioAssay(dc, "Raw bioassay A.24h (dye-swap)", sc2DyeSwap); 115 124 inheritAnnotations(dc, rba1, s1, bioSource); 116 125 inheritAnnotations(dc, rba2, s2, bioSource); … … 219 228 Create a labeled extract. 220 229 */ 221 public static LabeledExtract createLabeledExtract(DbControl dc, String name, Extract extract, String labelName)230 public static LabeledExtract createLabeledExtract(DbControl dc, String name, Extract extract, Label label) 222 231 { 223 232 TestUtil.write("--Creating labeled extract: " + name + "\n"); 224 225 Label label = Util.findLabel(dc, labelName);226 233 227 234 LabeledExtract labeledExtract = LabeledExtract.getNew(dc, label); … … 245 252 BioMaterialEvent creationEvent = hyb.getCreationEvent(); 246 253 creationEvent.setProtocol(Util.findProtocol(dc, "Hybridization A")); 254 creationEvent.setHardware(Util.findHardware(dc, "Hybridization station A")); 247 255 for (LabeledExtract le : extracts) 248 256 {
Note: See TracChangeset
for help on using the changeset viewer.