Skip to content

Commit

Permalink
Adding new executor
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-buttner committed Apr 17, 2024
1 parent c852506 commit 2291514
Show file tree
Hide file tree
Showing 2 changed files with 425 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.elasticsearch.xpack.inference.common;

import org.elasticsearch.common.Strings;
import org.elasticsearch.core.TimeValue;

import java.time.Clock;
import java.time.Instant;
Expand Down Expand Up @@ -119,6 +120,11 @@ private void accumulateTokens() {
}
}

// TODO remove
public TimeValue timeToReserve2(int tokens) {
return TimeValue.timeValueSeconds(1);
}

private static long microsBetweenExact(Instant start, Instant end) {
try {
return ChronoUnit.MICROS.between(start, end);
Expand Down
Loading

0 comments on commit 2291514

Please sign in to comment.