Created
November 7, 2015 15:20
-
-
Save msval/dc4e20afe85b2f2b1ed9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ("skinny-3of12".equalsIgnoreCase(operation)) { | |
| Select select = QueryBuilder.select(new String[] { "activity_id", "start_time", "end_time" }).from("activities"); | |
| select.where(QueryBuilder.eq("activity_id", | |
| UUID.fromString("72b493f0-e59d-11e3-9bd6-0050568317e1"))); | |
| Activity3of12 a; | |
| startTime = System.currentTimeMillis(); | |
| for (int i = 0; i < count; i++) { | |
| a = cassandraOps.selectOne(select, Activity3of12.class); | |
| log.info("{}, {}, {}", a.getActivityId(), a.getStartTime(), a.getEndTime()); | |
| } | |
| } | |
| else if ("skinny".equalsIgnoreCase(operation)) { | |
| Select select = QueryBuilder.select().from("activities"); | |
| select.where(QueryBuilder.eq("activity_id", | |
| UUID.fromString("72b493f0-e59d-11e3-9bd6-0050568317e1"))); | |
| Activity a; | |
| startTime = System.currentTimeMillis(); | |
| for (int i = 0; i < count; i++) { | |
| a = cassandraOps.selectOne(select, Activity.class); | |
| log.info("{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}", | |
| a.getActivity_id(), a.getActivity_model_id(), a.getActivity_state(), a.getAsset_id(), | |
| a.getAttrs().size(), a.getCreation_time(), a.getCustomer_id(), a.getEnd_time(), | |
| a.getLast_modified_time(), a.getPerson_id(), a.getPoi_id(), a.getStart_time()); | |
| } | |
| } | |
| long endTime = System.currentTimeMillis(); | |
| log.info("Duration: {} ms", endTime - startTime); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment