Skip to content

Commit

Permalink
Add performance tests for several of our data loading algorithms. Re #…
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Nov 8, 2011
1 parent c964933 commit 66c51b5
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Code/Mantid/Framework/DataHandling/test/LoadEventNexusTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,22 @@ class LoadEventNexusTest : public CxxTest::TestSuite

};

//------------------------------------------------------------------------------
// Performance test
//------------------------------------------------------------------------------

class LoadEventNexusTestPerformance : public CxxTest::TestSuite
{
public:
void testDefaultLoad()
{
LoadEventNexus loader;
loader.initialize();
loader.setPropertyValue("Filename", "CNCS_7860_event.nxs");
loader.setPropertyValue("OutputWorkspace", "ws");
TS_ASSERT( loader.execute() );
}
};

#endif /*LOADEVENTNEXUSTEST_H_*/

Expand Down
19 changes: 18 additions & 1 deletion Code/Mantid/Framework/DataHandling/test/LoadEventPreNexusTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class LoadEventPreNexusTest : public CxxTest::TestSuite
EventWorkspace_sptr chunk1 = boost::dynamic_pointer_cast<EventWorkspace>
(AnalysisDataService::Instance().retrieve("chunk1"));

// Load chunk 2 of 10
// Load chunk 2 of 2
eventLoader->setPropertyValue("EventFilename", "CNCS_7860_neutron_event.dat");
eventLoader->setPropertyValue("ChunkNumber","2");
eventLoader->setPropertyValue("TotalChunks","2");
Expand All @@ -309,5 +309,22 @@ class LoadEventPreNexusTest : public CxxTest::TestSuite

};

//------------------------------------------------------------------------------
// Performance test
//------------------------------------------------------------------------------

class LoadEventPreNexusTestPerformance : public CxxTest::TestSuite
{
public:
void testDefaultLoad()
{
LoadEventPreNexus loader;
loader.initialize();
loader.setPropertyValue("EventFilename", "CNCS_7860_neutron_event.dat");
loader.setPropertyValue("OutputWorkspace", "ws");
TS_ASSERT( loader.execute() );
}
};

#endif /* LOADEVENTPRENEXUSTEST_H_ */

17 changes: 17 additions & 0 deletions Code/Mantid/Framework/DataHandling/test/LoadNexusProcessedTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,21 @@ class LoadNexusProcessedTest : public CxxTest::TestSuite
std::string testFile, output_ws;
};

//------------------------------------------------------------------------------
// Performance test
//------------------------------------------------------------------------------

class LoadNexusProcessedTestPerformance : public CxxTest::TestSuite
{
public:
void testHistogramWorkspace()
{
LoadNexusProcessed loader;
loader.initialize();
loader.setPropertyValue("Filename", "PG3_733_focussed.nxs");
loader.setPropertyValue("OutputWorkspace", "ws");
TS_ASSERT( loader.execute() );
}
};

#endif /*LOADNEXUSPROCESSEDTESTRAW_H_*/
19 changes: 19 additions & 0 deletions Code/Mantid/Framework/DataHandling/test/LoadRaw3Test.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,4 +869,23 @@ class LoadRaw3Test : public CxxTest::TestSuite
std::string outputSpace;
};

//------------------------------------------------------------------------------
// Performance test
//------------------------------------------------------------------------------

class LoadRaw3TestPerformance : public CxxTest::TestSuite
{
public:
void testDefaultLoad()
{
LoadRaw3 loader;
loader.initialize();
loader.setPropertyValue("Filename", "HET15869.raw");
loader.setPropertyValue("OutputWorkspace", "ws");
TS_ASSERT( loader.execute() );
}
};



#endif /*LoadRaw3TEST_H_*/

0 comments on commit 66c51b5

Please sign in to comment.