chore: Bump version to 1.6.19 and refactor AgentRequestStatistic for improved instantiation and duration handling

This commit is contained in:
extio-de
2025-09-27 08:48:02 +02:00
parent b5f9a21f8b
commit d77c11e809
3 changed files with 31 additions and 10 deletions

View File

@@ -45,19 +45,19 @@ public final class AgentContext {
public AgentContext() {
this.agents = new HashMap<>();
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
this.requestStatistic = AgentRequestStatistic.create();
}
public AgentContext(final Collection<? extends BaseAgent> agents) {
this.agents = agents.stream().collect(Collectors.toMap(BaseAgent::name, agent -> agent));
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
this.requestStatistic = AgentRequestStatistic.create();
}
public AgentContext(final Map<String, ? extends BaseAgent> agents) {
this.agents = agents;
this.context = new ConcurrentHashMap<>();
this.requestStatistic = new AgentRequestStatistic();
this.requestStatistic = AgentRequestStatistic.create();
}
public AgentContext(final AgentContext other) {