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)
|
* @see #formatThroughput(int, TimeUnit)
|
||||||
*/
|
*/
|
||||||
public double getThroughput(int theNumOperations, TimeUnit theUnit) {
|
public double getThroughput(long theNumOperations, TimeUnit theUnit) {
|
||||||
if (theNumOperations <= 0) {
|
if (theNumOperations <= 0) {
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
@ -229,10 +229,9 @@ public class StopWatch {
|
||||||
long millisElapsed = Math.max(1, getMillis());
|
long millisElapsed = Math.max(1, getMillis());
|
||||||
long periodMillis = theUnit.toMillis(1);
|
long periodMillis = theUnit.toMillis(1);
|
||||||
|
|
||||||
double numerator = theNumOperations;
|
|
||||||
double denominator = ((double) millisElapsed) / ((double) periodMillis);
|
double denominator = ((double) millisElapsed) / ((double) periodMillis);
|
||||||
|
|
||||||
return numerator / denominator;
|
return (double) theNumOperations / denominator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restart() {
|
public void restart() {
|
||||||
|
|
|
@ -94,6 +94,10 @@ public class AnyListResource {
|
||||||
return (org.hl7.fhir.r4.model.ListResource) get();
|
return (org.hl7.fhir.r4.model.ListResource) get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FhirVersionEnum getFhirVersion() {
|
||||||
|
return myFhirVersion;
|
||||||
|
}
|
||||||
|
|
||||||
public void addCode(String theSystem, String theCode) {
|
public void addCode(String theSystem, String theCode) {
|
||||||
switch (myFhirVersion) {
|
switch (myFhirVersion) {
|
||||||
case DSTU3:
|
case DSTU3:
|
||||||
|
|
Loading…
Reference in New Issue