This is an automated email from the ASF dual-hosted git repository. aradzinski pushed a commit to branch NLPCRAFT-41 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit fabb7252df559bb9786e05d00f0c5f0807a4627e Author: Aaron Radzinski <[email protected]> AuthorDate: Tue Sep 8 17:18:26 2020 -0700 WIP. --- .../apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala | 4 ++-- .../main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala index 2f080a3..cd5a669 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/opencensus/NCOpenCensusServerStats.scala @@ -31,8 +31,7 @@ import io.opencensus.stats._ trait NCOpenCensusServerStats { val M_ASK_LATENCY_MS: MeasureLong = MeasureLong.create("ask_latency", "The latency of '/ask' REST call", "ms") val M_CHECK_LATENCY_MS: MeasureLong = MeasureLong.create("check_latency", "The latency of '/check' REST call", "ms") - val M_MODEL_INSPECT_LATENCY_MS: MeasureLong = MeasureLong.create("model_inspect_latency", "The latency of '/model/inspect' REST call", "ms") - val M_MODEL_INSPECTION_ALL_LATENCY_MS: MeasureLong = MeasureLong.create("model_inspection_all_latency", "The latency of '/model/inspection/all' REST call", "ms") + val M_MODEL_SUGSYN_LATENCY_MS: MeasureLong = MeasureLong.create("model_inspect_latency", "The latency of '/model/inspect' REST call", "ms") val M_CANCEL_LATENCY_MS: MeasureLong = MeasureLong.create("cancel_latency", "The latency of '/cancel' REST call", "ms") val M_SIGNIN_LATENCY_MS: MeasureLong = MeasureLong.create("signin_latency", "The latency of '/signin' REST call", "ms") val M_SIGNOUT_LATENCY_MS: MeasureLong = MeasureLong.create("signout_latency", "The latency of '/signout' REST call", "ms") @@ -113,6 +112,7 @@ trait NCOpenCensusServerStats { mkViews(M_COMPANY_UPDATE_LATENCY_MS, "company/update"), mkViews(M_COMPANY_TOKEN_LATENCY_MS, "company/token"), mkViews(M_COMPANY_DELETE_LATENCY_MS, "company/delete"), + mkViews(M_MODEL_SUGSYN_LATENCY_MS, "model/sugsyn"), mkViews(M_USER_ADD_LATENCY_MS, "user/add"), mkViews(M_USER_GET_LATENCY_MS, "user/get"), mkViews(M_USER_DELETE_LATENCY_MS, "user/delete"), diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala index c7132ac..af39112 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala @@ -739,7 +739,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w * * @return */ - protected def inspect$(): Route = { + protected def sugsyn$(): Route = { entity(as[JsValue]) { req ⇒ //noinspection DuplicatedCode val obj = req.asJsObject() @@ -1957,8 +1957,7 @@ class NCBasicRestApi extends NCRestApi with LazyLogging with NCOpenCensusTrace w path(API / "feedback"/ "all") { withMetric(M_FEEDBACK_GET_LATENCY_MS, feedback$All) } ~ path(API / "feedback" / "delete") { withMetric(M_FEEDBACK_DELETE_LATENCY_MS, feedback$Delete) } ~ path(API / "probe" / "all") { withMetric(M_PROBE_ALL_LATENCY_MS, probe$All) } ~ - path(API / "model" / "inspect") { withMetric(M_MODEL_INSPECT_LATENCY_MS, inspect$) } ~ - path(API / "model" / "inspection" / "all") { withMetric(M_MODEL_INSPECTION_ALL_LATENCY_MS, inspection$All) } ~ + path(API / "model" / "sugsyn") { withMetric(M_MODEL_SUGSYN_LATENCY_MS, sugsyn$) } ~ path(API / "ask") { withMetric(M_ASK_LATENCY_MS, ask$) } ~ path(API / "ask" / "sync") { withMetric(M_ASK_SYNC_LATENCY_MS, ask$Sync) } }
