chore: Bump version to 1.6.19 and refactor AgentRequestStatistic for improved instantiation and duration handling
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user