Changed Stopwatch getThroughput param from int to long

Added FhirVersion accessor to AnyListResource
This commit is contained in:
Ken Stevens 2019-07-31 16:40:40 -04:00 committed by James Agnew
parent 3196bc370f
commit f1d3fc2307
2 changed files with 6 additions and 3 deletions

View File

@ -221,7 +221,7 @@ public class StopWatch {
*
* @see #formatThroughput(int, TimeUnit)
*/
public double getThroughput(int theNumOperations, TimeUnit theUnit) {
public double getThroughput(long theNumOperations, TimeUnit theUnit) {
if (theNumOperations <= 0) {
return 0.0f;
}
@ -229,10 +229,9 @@ public class StopWatch {
long millisElapsed = Math.max(1, getMillis());
long periodMillis = theUnit.toMillis(1);
double numerator = theNumOperations;
double denominator = ((double) millisElapsed) / ((double) periodMillis);
return numerator / denominator;
return (double) theNumOperations / denominator;
}
public void restart() {

View File

@ -94,6 +94,10 @@ public class AnyListResource {
return (org.hl7.fhir.r4.model.ListResource) get();
}
public FhirVersionEnum getFhirVersion() {
return myFhirVersion;
}
public void addCode(String theSystem, String theCode) {
switch (myFhirVersion) {
case DSTU3: