code: def time_throughput(nmessages, t=0, f=wait):
      client = parallel.Client()
      view = client.load_balanced_view()
      # do one ping before starting timing
      if f is echo:
          t = np.random.random(t / 8)
      view.apply_sync(echo, "")
      client.spin()
      tic = time.time()
      for i in range(nmessages):
          view.apply(f, t)
      lap = time.time()
      client.wait()
      toc = time.time()
      return lap - tic, toc - tic
  
file_path: ipyparallel/examples/throughput.py
imports: import time
  import numpy
  import ipyparallel
label_desc: Use image node_id 3 for calling a global function with example usage: time_throughput(nmessages, t, f) and returns: unknown,  unknown