Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
    with self.assertNumQueries(0):
        outcomes.store_outcome_parameters(params, self.user, self.consumer)

XBlock Instantiation Counting

Instantiating XBlocks can be expensive, and large numbers of instantiations can be indicative of a bad query pattern.

Code Block
languagepy
with check_sum_of_calls(XBlock, ['__init__'], instantiations, instantiations, include_arguments=False):
    self.grade_course(self.course)