Changed Stopwatch getThroughput param from int to long
Added FhirVersion accessor to AnyListResource
This commit is contained in:
parent
3196bc370f
commit
f1d3fc2307
|
@ -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() {
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue