'Generate timings for different amounts of asset metadata and different modulestores.'

@ddt.data(*itertools.product(MODULESTORE_SETUPS, MODULESTORE_SETUPS, ASSET_AMOUNT_PER_TEST))
@ddt.unpack
def test_generate_import_export_timings(self, source_ms, dest_ms, num_assets):

    if (CodeBlockTimer is None):
        raise SkipTest('CodeBlockTimer    undefined.')
    desc = 'XMLRoundTrip:{}->{}:{}'.format(SHORT_NAME_MAP[source_ms], SHORT_NAME_MAP[dest_ms], num_assets)
    with CodeBlockTimer(desc):
        with CodeBlockTimer('fake_assets'):
            make_asset_xml(num_assets, ASSET_XML_PATH)
            validate_xml(ASSET_XSD_PATH, ASSET_XML_PATH)
        with source_ms.build() as (source_content, source_store):
            with dest_ms.build() as (dest_content, dest_store):
                source_course_key = source_store.make_course_key('a', 'course', 'course')
                dest_course_key = dest_store.make_course_key('a', 'course', 'course')
                with CodeBlockTimer('initial_import'):
                    import_course_from_xml(source_store, 'test_user', TEST_DATA_ROOT, source_dirs=TEST_COURSE, static_content_store=source_content, target_id=source_course_key, create_if_not_present=True, raise_on_failure=True)
                with CodeBlockTimer('export'):
                    export_course_to_xml(source_store, source_content, source_course_key, self.export_dir, 'exported_source_course')
                with CodeBlockTimer('second_import'):
                    import_course_from_xml(dest_store, 'test_user', self.export_dir, source_dirs=['exported_source_course'], static_content_store=dest_content, target_id=dest_course_key, create_if_not_present=True, raise_on_failure=True)
