Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
032b8401
Commit
032b8401
authored
11 years ago
by
Gigg, Martyn Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Add a performance test for searching the loaders. Refs #7352
parent
14c9e4c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/DataHandling/test/LoadTest.h
+30
-0
30 additions, 0 deletions
Code/Mantid/Framework/DataHandling/test/LoadTest.h
with
30 additions
and
0 deletions
Code/Mantid/Framework/DataHandling/test/LoadTest.h
+
30
−
0
View file @
032b8401
...
...
@@ -574,4 +574,34 @@ public:
}
};
//-------------------------------------------------------------------------------------------------
// Performance test
//
// This simple checks how long it takes to run the search for a Loader, which is done when
// the file property is set
//-------------------------------------------------------------------------------------------------
class
LoadTestPerformance
:
public
CxxTest
::
TestSuite
{
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static
LoadTestPerformance
*
createSuite
()
{
return
new
LoadTestPerformance
();
}
static
void
destroySuite
(
LoadTestPerformance
*
suite
)
{
delete
suite
;
}
void
test_find_loader_performance
()
{
const
size_t
ntimes
(
5
);
for
(
size_t
i
=
0
;
i
<
ntimes
;
++
i
)
{
Mantid
::
DataHandling
::
Load
loader
;
loader
.
initialize
();
loader
.
setPropertyValue
(
"Filename"
,
"CNCS_7860_event.nxs"
);
}
}
};
#endif
/*LOADTEST_H_*/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment