[Hawkular-commits] [hawkular/hawkular-metrics] 0bce91: [HWKMETRICS-199] initia support for virtual clock ...

John Sanda jsanda at redhat.com
Fri Aug 7 10:01:50 EDT 2015


  Branch: refs/heads/virtual-clock
  Home:   https://github.com/hawkular/hawkular-metrics
  Commit: 0bce919692df8f90c12725a44479769675fd8356
      https://github.com/hawkular/hawkular-metrics/commit/0bce919692df8f90c12725a44479769675fd8356
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/HawkularMetricsRestApp.java
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/MetricsServiceLifecycle.java
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/config/ConfigurationKey.java
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/filter/TenantFilter.java
    A api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/handler/VirtualClockHandler.java
    A api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/util/VirtualClock.java
    M core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/MetricsServiceImpl.java
    M core/metrics-core-impl/src/test/java/org/hawkular/metrics/core/impl/FakeTaskScheduler.java
    M rest-tests/pom.xml
    M rest-tests/src/test/groovy/org/hawkular/metrics/rest/CountersITest.groovy
    M task-queue/src/main/java/org/hawkular/metrics/tasks/api/TaskScheduler.java
    M task-queue/src/main/java/org/hawkular/metrics/tasks/impl/TaskSchedulerImpl.java

  Log Message:
  -----------
  [HWKMETRICS-199] initia support for virtual clock in REST API tests

H-Metrics will use the virtual clock when the system property
hawkular.metrics.use-virtual-clock is set to true. It will cause the
VirtualClockHandler to be deployed. It provides endpoints for fetching,
setting, and incrementing the clock.

There is still some work to do to make tests more repeatable. Tests still have
to spin for some short delay to allow time for task execution to complete. This
of course is problematic because there is no way to know how long to block. We
need additional endpoints that provide functionality that are used in other
tests. That is, tests essentially wait for notifications from the task
scheduler that it has finished work for a time slice.


  Commit: 4d77cc5551546fe9a2bf0044e1827b03c7054e02
      https://github.com/hawkular/hawkular-metrics/commit/4d77cc5551546fe9a2bf0044e1827b03c7054e02
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/handler/VirtualClockHandler.java
    M rest-tests/src/test/groovy/org/hawkular/metrics/rest/CountersITest.groovy
    M task-queue/src/main/java/org/hawkular/metrics/tasks/api/TaskScheduler.java
    M task-queue/src/main/java/org/hawkular/metrics/tasks/impl/TaskSchedulerImpl.java

  Log Message:
  -----------
  [HWKMETRICS-199] add an endpoint to block until scheduler finishes work

There is a new endpoint to block for a specified duration. On the server side,
we subscribe to the task schedulers time slices observable which emits a
timestamp at the completion of each time slice. That is, a timestamp is emitted
when all of the work for the time slice is finished. A request like,

  GET /hawkulr/metrics/clock/wait?duration=5min

will block the request until the task scheduler has completed the work for five
time slices.


  Commit: 3e02e8b0144a751a6296990fa2bfb2868d64155f
      https://github.com/hawkular/hawkular-metrics/commit/3e02e8b0144a751a6296990fa2bfb2868d64155f
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M core/metrics-core-impl/src/test/java/org/hawkular/metrics/core/impl/FakeTaskScheduler.java

  Log Message:
  -----------
  [HWKMETRICS-199] fix compile errors


  Commit: 7f1008673417ad3d0d39cdcb1ec43a207ae9fc48
      https://github.com/hawkular/hawkular-metrics/commit/7f1008673417ad3d0d39cdcb1ec43a207ae9fc48
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/handler/VirtualClockHandler.java

  Log Message:
  -----------
  fix checkstyle error


  Commit: 03e63c397d4e72915ab3afe226668a032a3945d3
      https://github.com/hawkular/hawkular-metrics/commit/03e63c397d4e72915ab3afe226668a032a3945d3
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/handler/VirtualClockHandler.java

  Log Message:
  -----------
  [HWKMETRICS-199] add back missing @Inject annotation to fix test


  Commit: ac1da63c7826a88db7020e0dabb12e80fa3b4e51
      https://github.com/hawkular/hawkular-metrics/commit/ac1da63c7826a88db7020e0dabb12e80fa3b4e51
  Author: John Sanda <jsanda at redhat.com>
  Date:   2015-08-07 (Fri, 07 Aug 2015)

  Changed paths:
    M task-queue/src/main/java/org/hawkular/metrics/tasks/impl/TaskSchedulerImpl.java

  Log Message:
  -----------
  [HWKMETRICS-199] fix rebase errors

Conflicts:
	api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/MetricsServiceLifecycle.java
	task-queue/src/test/java/org/hawkular/metrics/tasks/impl/TaskSchedulerITest.java


Compare: https://github.com/hawkular/hawkular-metrics/compare/0bce919692df^...ac1da63c7826


More information about the hawkular-commits mailing list