scala-academy / castalia

API stub server
Other
8 stars 3 forks source link

As a stubserver consumer I want to be able to verify how often a specific stub has been called #14

Open jordi133 opened 8 years ago

jordi133 commented 8 years ago

under construction

jeanmarc commented 8 years ago

Proposal: have the actors send a message to a statistics-collector, which can then be queried for information. consumers can ask on the manager port for endpoint statistics by GET-ting /castalia/manager/endpoints/statistics. That will respond with a json like: { "statistics": [ {"endpoint": "stub/path/$parm", "summary": { "calls": 12345 } }, {"endpoint": "another/stub", "summary": {"calls": 0 } }] }

Optional: provide details for the known responses of an endpoint (array with {"ids" : {...}, "calls": nn} )

Optional: provide details for the httpStatusCodes per endpoint (array with {"httpStatusCode" : nn, "calls": mm} )

? What about duration statistics (actual min, max, average, p95, p99 values)