Ticket #7707 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Speed up MedianDetectorTest unit test

Reported by: Russell Taylor Owned by: Andrei Savici
Priority: critical Milestone: Release 3.0
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #7521 Tester: Russell Taylor

Description

This is in many cases our slowest unit test - it has been observed to take many minutes.

The slow methods are testSolidAngle and (particularly) testLevelsUp. They need to be refactored to not load an instrument from disk but to create a small instrument in memory and use that. If possible, only create the instrument once and use it in both tests.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Keywords Maintenance added

comment:2 Changed 7 years ago by Andrei Savici

  • Status changed from new to inprogress

MedianDetectorTest no LoadEmptyInstrument. Refs #7707

Changeset: 6da8f978d457db6f7a12817f70a3bd84e9d5bc37

comment:3 Changed 7 years ago by Andrei Savici

  • Status changed from inprogress to verify
  • Resolution set to fixed

MedianDetectorTestTest should run in less than 2 seconds on any platform, instead of minutes

comment:4 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:5 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Looking at the ISIS develop clean build timings for this test:

  • OS X 10.6 : 31 -> 0.19 sec
  • OS X 10.8 : 5 min 27 sec -> 0.53 sec !!!!'''
  • Ubuntu : 12 sec -> 99 ms
  • RHEL6 : 1 min 15 sec -> 6.4 sec
  • Win64 : 13 sec -> 50 ms
  • Win32 : 1 min 7 sec -> 7.6 sec

And on my RHEL6 debug build, the total time (including setup time, which is not included above) has decrease from 10 to 1 sec.

It's still a touch slow in a couple of places, but overall this is a more than satisfactory outcome.

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8552

Note: See TracTickets for help on using tickets.