       d = _.mapValues(d, (v) -> v.toFixed(2))
       d.count = Math.round(d.count)
       d)
-    .subscribe((e) -> eventSources.requests.onNext(e))
+    .subscribe((e) -> eventSubjects.requests.onNext(e))
+
   observeWebSocket(url("responseTimes"))
     .sample(500)
-    .subscribe((e) -> eventSources.responseTimes.onNext(e))
+    .subscribe((e) -> eventSubjects.responseTimes.onNext(e))
 
 ################################################################################
 # additional Observable event sources demos included in presentation

  wsport = "8080" #document.location.port
  "ws://#{host}:#{wsport}#{path}"

demos.metricsWebsockets = (config, eventSources) ->
  url = (endpoint_name) ->
    url0 = config.wsAPI[endpoint_name]
    if url0[0] == "/"

  dx: 0
  dy: 0

demos.mouseDrags = (eventSubjects) ->
  dragsSource = mouseDrags(document)
  dragsSource.subscribe (drag) -> eventSubjects.mouseDrags.onNext(drag)
  dragsSource.subscribe(logAllObserver('drags'))
  mouseUp.subscribe () -> eventSubjects.mouseDrags.onNext(mouseDragResetEv)

demos.timer = (eventSubjects) ->
  ticks = Observable
    .interval(1000) # ms
    .timeInterval()
    .pausable(eventSubjects.timerSwitch)
    .pluck("value")
  ticks.subscribe((tick) -> eventSubjects.timer.onNext(tick))
  ticks.subscribe(logAllObserver('timer'))

################################################################################
