summaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/src/benchmarks/regression/BreakIteratorBenchmark.java6
-rw-r--r--benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java20
-rw-r--r--benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java2
3 files changed, 15 insertions, 13 deletions
diff --git a/benchmarks/src/benchmarks/regression/BreakIteratorBenchmark.java b/benchmarks/src/benchmarks/regression/BreakIteratorBenchmark.java
index b58077d..8602ddc 100644
--- a/benchmarks/src/benchmarks/regression/BreakIteratorBenchmark.java
+++ b/benchmarks/src/benchmarks/regression/BreakIteratorBenchmark.java
@@ -61,11 +61,11 @@ public final class BreakIteratorBenchmark extends SimpleBenchmark {
public void timeIcuBreakIterator(int nreps) {
for (int i = 0; i < nreps; ++i) {
- com.android.ibm.icu.text.BreakIterator it =
- com.android.ibm.icu.text.BreakIterator.getLineInstance(text.locale);
+ android.icu.text.BreakIterator it =
+ android.icu.text.BreakIterator.getLineInstance(text.locale);
it.setText(text.text);
- while (it.next() != com.android.ibm.icu.text.BreakIterator.DONE) {
+ while (it.next() != android.icu.text.BreakIterator.DONE) {
}
}
}
diff --git a/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java b/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java
index 02d8f97..e904b4d 100644
--- a/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java
+++ b/benchmarks/src/benchmarks/regression/DateIntervalFormatBenchmark.java
@@ -18,39 +18,41 @@ package benchmarks.regression;
import com.google.caliper.SimpleBenchmark;
-import java.util.Locale;
-import java.util.TimeZone;
+import android.icu.util.ULocale;
+import android.icu.util.TimeZone;
-import static libcore.icu.DateIntervalFormat.*;
+import libcore.icu.DateIntervalFormat;
+
+import static libcore.icu.DateUtilsBridge.*;
public class DateIntervalFormatBenchmark extends SimpleBenchmark {
public void timeDateIntervalFormat_formatDateRange_DATE(int reps) throws Exception {
- Locale l = Locale.US;
+ ULocale l = ULocale.US;
TimeZone utc = TimeZone.getTimeZone("UTC");
int flags = FORMAT_SHOW_DATE | FORMAT_SHOW_WEEKDAY;
for (int rep = 0; rep < reps; ++rep) {
- formatDateRange(l, utc, 0L, 0L, flags);
+ DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
}
}
public void timeDateIntervalFormat_formatDateRange_TIME(int reps) throws Exception {
- Locale l = Locale.US;
+ ULocale l = ULocale.US;
TimeZone utc = TimeZone.getTimeZone("UTC");
int flags = FORMAT_SHOW_TIME | FORMAT_24HOUR;
for (int rep = 0; rep < reps; ++rep) {
- formatDateRange(l, utc, 0L, 0L, flags);
+ DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
}
}
public void timeDateIntervalFormat_formatDateRange_DATE_TIME(int reps) throws Exception {
- Locale l = Locale.US;
+ ULocale l = ULocale.US;
TimeZone utc = TimeZone.getTimeZone("UTC");
int flags = FORMAT_SHOW_DATE | FORMAT_SHOW_WEEKDAY | FORMAT_SHOW_TIME | FORMAT_24HOUR;
for (int rep = 0; rep < reps; ++rep) {
- formatDateRange(l, utc, 0L, 0L, flags);
+ DateIntervalFormat.formatDateRange(l, utc, 0L, 0L, flags);
}
}
}
diff --git a/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java b/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java
index 30670b4..ea2cf4a 100644
--- a/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java
+++ b/benchmarks/src/benchmarks/regression/RelativeDateTimeFormatterBenchmark.java
@@ -21,9 +21,9 @@ import com.google.caliper.SimpleBenchmark;
import java.util.Locale;
import java.util.TimeZone;
+import static libcore.icu.DateUtilsBridge.FORMAT_ABBREV_RELATIVE;
import static libcore.icu.RelativeDateTimeFormatter.getRelativeDateTimeString;
import static libcore.icu.RelativeDateTimeFormatter.getRelativeTimeSpanString;
-import static libcore.icu.RelativeDateTimeFormatter.FORMAT_ABBREV_RELATIVE;
public class RelativeDateTimeFormatterBenchmark extends SimpleBenchmark {
public void timeRelativeDateTimeFormatter_getRelativeTimeSpanString(int reps) throws Exception {