Fixed stdin buffer length in context
This commit is contained in:
@@ -69,7 +69,7 @@ class SystemMetrics:
|
||||
|
||||
time.sleep(self._sample_interval)
|
||||
|
||||
def generate_context(self, context_usage: float) -> ET.Element:
|
||||
def generate_context(self, context_usage: float, stdin_buffer_length: int) -> ET.Element:
|
||||
"""
|
||||
Generate XML context element with current system metrics.
|
||||
Clears usage samples after generating averages.
|
||||
@@ -112,7 +112,7 @@ class SystemMetrics:
|
||||
context.set("context_usage", str(round(context_usage * 100)))
|
||||
|
||||
# Standard input buffer size
|
||||
context.set("stdin", "0") # Set by agent
|
||||
context.set("stdin", stdin_buffer_length)
|
||||
|
||||
return context
|
||||
|
||||
|
||||
Reference in New Issue
Block a user