From bb1bff696ceacbb25cff5d825768e1a2b90f6796 Mon Sep 17 00:00:00 2001 From: Daniel McKnight <34697904+NeonDaniel@users.noreply.github.com> Date: Thu, 9 Nov 2023 17:44:52 -0800 Subject: [PATCH] Add timing metrics for response to handler in MQ client (#154) # Description Adds a timestamp when response is emitted for clients to calculate how long it takes to be handled # Issues # Other Notes https://github.com/NeonGeckoCom/neon_speech/pull/181 --------- Co-authored-by: Daniel McKnight --- .github/workflows/license_tests.yml | 4 +++- neon_audio/tts/neon.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/license_tests.yml b/.github/workflows/license_tests.yml index 3e61598..2a1167f 100644 --- a/.github/workflows/license_tests.yml +++ b/.github/workflows/license_tests.yml @@ -5,4 +5,6 @@ on: jobs: license_tests: - uses: neongeckocom/.github/.github/workflows/license_tests.yml@master \ No newline at end of file + uses: neongeckocom/.github/.github/workflows/license_tests.yml@master + with: + packages-exclude: '^(precise-runner|fann2|tqdm|bs4|ovos-phal-plugin|ovos-ocp|bitstruct|audioread).*' \ No newline at end of file diff --git a/neon_audio/tts/neon.py b/neon_audio/tts/neon.py index fdd9407..b52aa68 100644 --- a/neon_audio/tts/neon.py +++ b/neon_audio/tts/neon.py @@ -31,6 +31,8 @@ import os from os.path import dirname +from time import time + from json_database import JsonStorageXDG from ovos_bus_client.message import Message from ovos_plugin_manager.language import OVOSLangDetectionFactory,\ @@ -339,6 +341,7 @@ def execute(self, sentence: str, ident: str = None, listen: bool = False, # TODO dedicated klat handler/plugin if "klat_data" in message.context: LOG.info("Sending klat.response") + message.context['timing']['response_sent'] = time() self.bus.emit( message.forward("klat.response", {"responses": responses,