diff --git a/src/test/java/org/tests/profile/ProfileSimpleQuery.java b/src/test/java/org/tests/profile/ProfileSimpleQuery.java new file mode 100644 index 000000000..77102c74a --- /dev/null +++ b/src/test/java/org/tests/profile/ProfileSimpleQuery.java @@ -0,0 +1,35 @@ +package org.tests.profile; + +import org.tests.model.basic.Customer; +//import org.tests.model.basic.ResetBasicData; + +public class ProfileSimpleQuery { + + public static void main(String[] args) { + +// ResetBasicData.reset(); + ProfileSimpleQuery me = new ProfileSimpleQuery(); + me.runIt(); + + } + + private long counter; + + private void runIt() { + long start = System.currentTimeMillis(); + for (int i = 0; i < 1000_000; i++) { + readCustomer(); + } + long exe = System.currentTimeMillis() - start; + System.out.println("run in " + exe); + } + + private void readCustomer() { + Customer customer = Customer.find.byName("Rob"); + String name = customer.getName(); + if (name.length() > 999) { + counter++; + } + } + +}