docstr: Test that the algorithm is O(N**2) complexity for N activations
docstr_tok: ["Test","that","the","algorithm","is","O","(","N","*","*","2",")","complexity","for","N","activations"]
code: def test_find_best_reset_points_performance(self) -> None:
      """
      Test that the algorithm is O(N**2) complexity for N activations
      """
      import numpy as np
  
      activations_1000 = list(
          np.random.randint(low=0, high=1_000_000, size=1_000)
      )
      activations_2000 = list(
          np.random.randint(low=0, high=1_000_000, size=2_000)
      )
      nb_checkpoints = 10
      with with_timing(name="best_reset_points_1000") as timer_1000:
          find_best_reset_points(
              activations_1000, nb_checkpoints=nb_checkpoints
          )
      with with_timing(name="best_reset_points_2000") as timer_2000:
          find_best_reset_points(
              activations_2000, nb_checkpoints=nb_checkpoints
          )
      self.assertGreaterEqual(
          timer_2000.elapsed_time_ms, timer_1000.elapsed_time_ms
      )
      self.assertLessEqual(
          timer_2000.elapsed_time_ms, timer_1000.elapsed_time_ms * 6
      )
  
file_path: vissl/tests/test_layer_memory_tracking.py
imports: import unittest
  import torch
  import torch.distributed
  import torch.multiprocessing
  import torch.nn
  import torchvision.models
  from fairscale.nn import FullyShardedDataParallel
  from vissl.utils.layer_memory_tracking import find_best_reset_points, LayerwiseMemoryTracker, ProcessGroupTracker
  from vissl.utils.test_utils import gpu_test, init_distributed_on_file, with_temp_files, with_timing
label_desc: Use image node_id 6 for calling the TestLayerMemoryTracking obj's underlying member method code with example usage: obj.test_find_best_reset_points_performance() without return types