├── .gitignore ├── App ├── App.cpp ├── App.h ├── ErrorSupport.cpp ├── ErrorSupport.h ├── ocalls.cpp └── spinlock.c ├── Common ├── common.h └── hot_calls.h ├── Enclave.token ├── Enclave ├── Enclave.config.xml ├── Enclave.cpp ├── Enclave.edl ├── Enclave.h ├── Enclave.lds ├── Enclave_private.pem ├── core.cpp ├── gperftools │ ├── Makefile │ ├── README │ └── gperftools-2.5 │ │ ├── Makefile │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── README │ │ ├── autogen-linux.sh │ │ ├── config.guess │ │ ├── config.log │ │ ├── config.status │ │ ├── config.sub │ │ ├── configure │ │ ├── coreMakefile │ │ ├── depcomp │ │ ├── install-sh │ │ ├── libtool │ │ ├── ltmain.sh │ │ └── src │ │ ├── .dirstamp │ │ ├── addressmap-inl.h │ │ ├── base │ │ ├── .deps │ │ │ ├── .dirstamp │ │ │ ├── atomicops-internals-x86.Plo │ │ │ ├── dynamic_annotations.Plo │ │ │ ├── elf_mem_image.Plo │ │ │ ├── libtcmalloc_and_profiler_la-linuxthreads.Plo │ │ │ ├── libtcmalloc_debug_la-linuxthreads.Plo │ │ │ ├── libtcmalloc_internal_la-low_level_alloc.Plo │ │ │ ├── libtcmalloc_la-linuxthreads.Plo │ │ │ ├── logging.Plo │ │ │ ├── low_level_alloc_unittest-low_level_alloc.Po │ │ │ ├── sgx_utils.Plo │ │ │ ├── spinlock.Plo │ │ │ ├── spinlock_internal.Plo │ │ │ ├── sysinfo.Plo │ │ │ ├── thread_lister.Plo │ │ │ └── vdso_support.Plo │ │ ├── .dirstamp │ │ ├── arm_instruction_set_select.h │ │ ├── atomicops-internals-arm-generic.h │ │ ├── atomicops-internals-arm-v6plus.h │ │ ├── atomicops-internals-gcc.h │ │ ├── atomicops-internals-linuxppc.h │ │ ├── atomicops-internals-macosx.h │ │ ├── atomicops-internals-mips.h │ │ ├── atomicops-internals-windows.h │ │ ├── atomicops-internals-x86.cc │ │ ├── atomicops-internals-x86.h │ │ ├── atomicops.h │ │ ├── basictypes.h │ │ ├── commandlineflags.h │ │ ├── dynamic_annotations.c │ │ ├── dynamic_annotations.h │ │ ├── elf_mem_image.cc │ │ ├── elf_mem_image.h │ │ ├── elfcore.h │ │ ├── googleinit.h │ │ ├── linux_syscall_support.h │ │ ├── linuxthreads.cc │ │ ├── linuxthreads.h │ │ ├── logging.cc │ │ ├── logging.h │ │ ├── low_level_alloc.cc │ │ ├── low_level_alloc.h │ │ ├── sgx_utils.cc │ │ ├── simple_mutex.h │ │ ├── spinlock.cc │ │ ├── spinlock.h │ │ ├── spinlock_internal.cc │ │ ├── spinlock_internal.h │ │ ├── spinlock_linux-inl.h │ │ ├── spinlock_posix-inl.h │ │ ├── spinlock_win32-inl.h │ │ ├── stl_allocator.h │ │ ├── sysinfo.cc │ │ ├── sysinfo.h │ │ ├── thread_annotations.h │ │ ├── thread_lister.c │ │ ├── thread_lister.h │ │ ├── vdso_support.cc │ │ └── vdso_support.h │ │ ├── central_freelist.cc │ │ ├── central_freelist.h │ │ ├── common.cc │ │ ├── common.h │ │ ├── config.h │ │ ├── config.h.in │ │ ├── config_for_unittests.h │ │ ├── debugallocation.cc │ │ ├── emergency_malloc.cc │ │ ├── emergency_malloc.h │ │ ├── emergency_malloc_for_stacktrace.cc │ │ ├── getenv_safe.h │ │ ├── getpc.h │ │ ├── google │ │ ├── heap-checker.h │ │ ├── heap-profiler.h │ │ ├── malloc_extension.h │ │ ├── malloc_extension_c.h │ │ ├── malloc_hook.h │ │ ├── malloc_hook_c.h │ │ ├── profiler.h │ │ ├── stacktrace.h │ │ └── tcmalloc.h │ │ ├── gperftools │ │ ├── heap-checker.h │ │ ├── heap-profiler.h │ │ ├── malloc_extension.h │ │ ├── malloc_extension_c.h │ │ ├── malloc_hook.h │ │ ├── malloc_hook_c.h │ │ ├── profiler.h │ │ ├── stacktrace.h │ │ ├── tcmalloc.h │ │ └── tcmalloc.h.in │ │ ├── heap-checker-bcad.cc │ │ ├── heap-checker.cc │ │ ├── heap-profile-stats.h │ │ ├── heap-profile-table.cc │ │ ├── heap-profile-table.h │ │ ├── heap-profiler.cc │ │ ├── internal_logging.cc │ │ ├── internal_logging.h │ │ ├── libc_override.h │ │ ├── libc_override_gcc_and_weak.h │ │ ├── libc_override_glibc.h │ │ ├── libc_override_redefine.h │ │ ├── linked_list.h │ │ ├── malloc_extension.cc │ │ ├── malloc_hook-inl.h │ │ ├── malloc_hook.cc │ │ ├── malloc_hook_mmap_freebsd.h │ │ ├── malloc_hook_mmap_linux.h │ │ ├── maybe_emergency_malloc.h │ │ ├── maybe_threads.cc │ │ ├── maybe_threads.h │ │ ├── memfs_malloc.cc │ │ ├── memory_region_map.cc │ │ ├── memory_region_map.h │ │ ├── packed-cache-inl.h │ │ ├── page_heap.cc │ │ ├── page_heap.h │ │ ├── page_heap_allocator.h │ │ ├── pagemap.h │ │ ├── profile-handler.cc │ │ ├── profile-handler.h │ │ ├── profiledata.cc │ │ ├── profiledata.h │ │ ├── profiler.cc │ │ ├── raw_printer.cc │ │ ├── raw_printer.h │ │ ├── sampler.cc │ │ ├── sampler.h │ │ ├── span.cc │ │ ├── span.h │ │ ├── stack_trace_table.cc │ │ ├── stack_trace_table.h │ │ ├── stacktrace.cc │ │ ├── stacktrace_arm-inl.h │ │ ├── stacktrace_generic-inl.h │ │ ├── stacktrace_impl_setup-inl.h │ │ ├── stacktrace_instrument-inl.h │ │ ├── stacktrace_libgcc-inl.h │ │ ├── stacktrace_libunwind-inl.h │ │ ├── stacktrace_powerpc-darwin-inl.h │ │ ├── stacktrace_powerpc-inl.h │ │ ├── stacktrace_powerpc-linux-inl.h │ │ ├── stacktrace_win32-inl.h │ │ ├── stacktrace_x86-inl.h │ │ ├── stamp-h1 │ │ ├── static_vars.cc │ │ ├── static_vars.h │ │ ├── symbolize.cc │ │ ├── symbolize.h │ │ ├── system-alloc.cc │ │ ├── system-alloc.h │ │ ├── tcmalloc.cc │ │ ├── tcmalloc.h │ │ ├── tcmalloc_guard.h │ │ ├── thread_cache.cc │ │ └── thread_cache.h └── ht.cpp ├── Experiment ├── Motivation │ ├── Baseline_kvs │ │ ├── .gitignore │ │ ├── App │ │ │ ├── App.cpp │ │ │ ├── ErrorSupport.cpp │ │ │ └── ErrorSupport.h │ │ ├── Common │ │ │ └── common.h │ │ ├── Enclave.token │ │ ├── Enclave │ │ │ ├── Enclave.config.xml │ │ │ ├── Enclave.cpp │ │ │ ├── Enclave.edl │ │ │ ├── Enclave.h │ │ │ ├── Enclave.lds │ │ │ └── Enclave_private.pem │ │ ├── Makefile │ │ ├── README.md │ │ └── clean.sh │ ├── README.md │ ├── SGX_Enclave │ │ ├── .gitignore │ │ ├── App │ │ │ ├── App.cpp │ │ │ ├── ErrorSupport.cpp │ │ │ └── ErrorSupport.h │ │ ├── Enclave.token │ │ ├── Enclave │ │ │ ├── Enclave.config.xml │ │ │ ├── Enclave.cpp │ │ │ ├── Enclave.edl │ │ │ ├── Enclave.h │ │ │ ├── Enclave.lds │ │ │ └── Enclave_private.pem │ │ ├── Makefile │ │ ├── README.md │ │ └── expr.sh │ ├── SGX_Unprotected │ │ ├── .gitignore │ │ ├── App │ │ │ ├── App.cpp │ │ │ ├── ErrorSupport.cpp │ │ │ └── ErrorSupport.h │ │ ├── Enclave.token │ │ ├── Enclave │ │ │ ├── Enclave.config.xml │ │ │ ├── Enclave.cpp │ │ │ ├── Enclave.edl │ │ │ ├── Enclave.lds │ │ │ └── Enclave_private.pem │ │ ├── Include │ │ │ └── userdef.h │ │ ├── Makefile │ │ ├── README.md │ │ └── expr.sh │ ├── Switchless │ │ ├── App │ │ │ ├── App.cpp │ │ │ ├── App.h │ │ │ ├── ErrorSupport.cpp │ │ │ ├── ErrorSupport.h │ │ │ ├── ocalls.cpp │ │ │ └── spinlock.c │ │ ├── Common │ │ │ ├── common.h │ │ │ └── hot_calls.h │ │ ├── Enclave.token │ │ ├── Enclave │ │ │ ├── Enclave.config.xml │ │ │ ├── Enclave.cpp │ │ │ ├── Enclave.edl │ │ │ ├── Enclave.h │ │ │ ├── Enclave.lds │ │ │ ├── Enclave_private.pem │ │ │ ├── core.cpp │ │ │ ├── gperftools │ │ │ │ ├── Makefile │ │ │ │ ├── README │ │ │ │ └── gperftools-2.5 │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── Makefile.in │ │ │ │ │ ├── README │ │ │ │ │ ├── autogen-linux.sh │ │ │ │ │ ├── config.guess │ │ │ │ │ ├── config.log │ │ │ │ │ ├── config.status │ │ │ │ │ ├── config.sub │ │ │ │ │ ├── configure │ │ │ │ │ ├── coreMakefile │ │ │ │ │ ├── depcomp │ │ │ │ │ ├── install-sh │ │ │ │ │ ├── libtool │ │ │ │ │ ├── ltmain.sh │ │ │ │ │ └── src │ │ │ │ │ ├── .dirstamp │ │ │ │ │ ├── addressmap-inl.h │ │ │ │ │ ├── base │ │ │ │ │ ├── .deps │ │ │ │ │ │ ├── .dirstamp │ │ │ │ │ │ ├── atomicops-internals-x86.Plo │ │ │ │ │ │ ├── dynamic_annotations.Plo │ │ │ │ │ │ ├── elf_mem_image.Plo │ │ │ │ │ │ ├── libtcmalloc_and_profiler_la-linuxthreads.Plo │ │ │ │ │ │ ├── libtcmalloc_debug_la-linuxthreads.Plo │ │ │ │ │ │ ├── libtcmalloc_internal_la-low_level_alloc.Plo │ │ │ │ │ │ ├── libtcmalloc_la-linuxthreads.Plo │ │ │ │ │ │ ├── logging.Plo │ │ │ │ │ │ ├── low_level_alloc_unittest-low_level_alloc.Po │ │ │ │ │ │ ├── sgx_utils.Plo │ │ │ │ │ │ ├── spinlock.Plo │ │ │ │ │ │ ├── spinlock_internal.Plo │ │ │ │ │ │ ├── sysinfo.Plo │ │ │ │ │ │ ├── thread_lister.Plo │ │ │ │ │ │ └── vdso_support.Plo │ │ │ │ │ ├── .dirstamp │ │ │ │ │ ├── arm_instruction_set_select.h │ │ │ │ │ ├── atomicops-internals-arm-generic.h │ │ │ │ │ ├── atomicops-internals-arm-v6plus.h │ │ │ │ │ ├── atomicops-internals-gcc.h │ │ │ │ │ ├── atomicops-internals-linuxppc.h │ │ │ │ │ ├── atomicops-internals-macosx.h │ │ │ │ │ ├── atomicops-internals-mips.h │ │ │ │ │ ├── atomicops-internals-windows.h │ │ │ │ │ ├── atomicops-internals-x86.cc │ │ │ │ │ ├── atomicops-internals-x86.h │ │ │ │ │ ├── atomicops.h │ │ │ │ │ ├── basictypes.h │ │ │ │ │ ├── commandlineflags.h │ │ │ │ │ ├── dynamic_annotations.c │ │ │ │ │ ├── dynamic_annotations.h │ │ │ │ │ ├── elf_mem_image.cc │ │ │ │ │ ├── elf_mem_image.h │ │ │ │ │ ├── elfcore.h │ │ │ │ │ ├── googleinit.h │ │ │ │ │ ├── linux_syscall_support.h │ │ │ │ │ ├── linuxthreads.cc │ │ │ │ │ ├── linuxthreads.h │ │ │ │ │ ├── logging.cc │ │ │ │ │ ├── logging.h │ │ │ │ │ ├── low_level_alloc.cc │ │ │ │ │ ├── low_level_alloc.h │ │ │ │ │ ├── sgx_utils.cc │ │ │ │ │ ├── simple_mutex.h │ │ │ │ │ ├── spinlock.cc │ │ │ │ │ ├── spinlock.h │ │ │ │ │ ├── spinlock_internal.cc │ │ │ │ │ ├── spinlock_internal.h │ │ │ │ │ ├── spinlock_linux-inl.h │ │ │ │ │ ├── spinlock_posix-inl.h │ │ │ │ │ ├── spinlock_win32-inl.h │ │ │ │ │ ├── stl_allocator.h │ │ │ │ │ ├── sysinfo.cc │ │ │ │ │ ├── sysinfo.h │ │ │ │ │ ├── thread_annotations.h │ │ │ │ │ ├── thread_lister.c │ │ │ │ │ ├── thread_lister.h │ │ │ │ │ ├── vdso_support.cc │ │ │ │ │ └── vdso_support.h │ │ │ │ │ ├── central_freelist.cc │ │ │ │ │ ├── central_freelist.h │ │ │ │ │ ├── common.cc │ │ │ │ │ ├── common.h │ │ │ │ │ ├── config.h │ │ │ │ │ ├── config.h.in │ │ │ │ │ ├── config_for_unittests.h │ │ │ │ │ ├── debugallocation.cc │ │ │ │ │ ├── emergency_malloc.cc │ │ │ │ │ ├── emergency_malloc.h │ │ │ │ │ ├── emergency_malloc_for_stacktrace.cc │ │ │ │ │ ├── getenv_safe.h │ │ │ │ │ ├── getpc.h │ │ │ │ │ ├── google │ │ │ │ │ ├── heap-checker.h │ │ │ │ │ ├── heap-profiler.h │ │ │ │ │ ├── malloc_extension.h │ │ │ │ │ ├── malloc_extension_c.h │ │ │ │ │ ├── malloc_hook.h │ │ │ │ │ ├── malloc_hook_c.h │ │ │ │ │ ├── profiler.h │ │ │ │ │ ├── stacktrace.h │ │ │ │ │ └── tcmalloc.h │ │ │ │ │ ├── gperftools │ │ │ │ │ ├── heap-checker.h │ │ │ │ │ ├── heap-profiler.h │ │ │ │ │ ├── malloc_extension.h │ │ │ │ │ ├── malloc_extension_c.h │ │ │ │ │ ├── malloc_hook.h │ │ │ │ │ ├── malloc_hook_c.h │ │ │ │ │ ├── profiler.h │ │ │ │ │ ├── stacktrace.h │ │ │ │ │ ├── tcmalloc.h │ │ │ │ │ └── tcmalloc.h.in │ │ │ │ │ ├── heap-checker-bcad.cc │ │ │ │ │ ├── heap-checker.cc │ │ │ │ │ ├── heap-profile-stats.h │ │ │ │ │ ├── heap-profile-table.cc │ │ │ │ │ ├── heap-profile-table.h │ │ │ │ │ ├── heap-profiler.cc │ │ │ │ │ ├── internal_logging.cc │ │ │ │ │ ├── internal_logging.h │ │ │ │ │ ├── libc_override.h │ │ │ │ │ ├── libc_override_gcc_and_weak.h │ │ │ │ │ ├── libc_override_glibc.h │ │ │ │ │ ├── libc_override_redefine.h │ │ │ │ │ ├── linked_list.h │ │ │ │ │ ├── malloc_extension.cc │ │ │ │ │ ├── malloc_hook-inl.h │ │ │ │ │ ├── malloc_hook.cc │ │ │ │ │ ├── malloc_hook_mmap_freebsd.h │ │ │ │ │ ├── malloc_hook_mmap_linux.h │ │ │ │ │ ├── maybe_emergency_malloc.h │ │ │ │ │ ├── maybe_threads.cc │ │ │ │ │ ├── maybe_threads.h │ │ │ │ │ ├── memfs_malloc.cc │ │ │ │ │ ├── memory_region_map.cc │ │ │ │ │ ├── memory_region_map.h │ │ │ │ │ ├── packed-cache-inl.h │ │ │ │ │ ├── page_heap.cc │ │ │ │ │ ├── page_heap.h │ │ │ │ │ ├── page_heap_allocator.h │ │ │ │ │ ├── pagemap.h │ │ │ │ │ ├── profile-handler.cc │ │ │ │ │ ├── profile-handler.h │ │ │ │ │ ├── profiledata.cc │ │ │ │ │ ├── profiledata.h │ │ │ │ │ ├── profiler.cc │ │ │ │ │ ├── raw_printer.cc │ │ │ │ │ ├── raw_printer.h │ │ │ │ │ ├── sampler.cc │ │ │ │ │ ├── sampler.h │ │ │ │ │ ├── span.cc │ │ │ │ │ ├── span.h │ │ │ │ │ ├── stack_trace_table.cc │ │ │ │ │ ├── stack_trace_table.h │ │ │ │ │ ├── stacktrace.cc │ │ │ │ │ ├── stacktrace_arm-inl.h │ │ │ │ │ ├── stacktrace_generic-inl.h │ │ │ │ │ ├── stacktrace_impl_setup-inl.h │ │ │ │ │ ├── stacktrace_instrument-inl.h │ │ │ │ │ ├── stacktrace_libgcc-inl.h │ │ │ │ │ ├── stacktrace_libunwind-inl.h │ │ │ │ │ ├── stacktrace_powerpc-darwin-inl.h │ │ │ │ │ ├── stacktrace_powerpc-inl.h │ │ │ │ │ ├── stacktrace_powerpc-linux-inl.h │ │ │ │ │ ├── stacktrace_win32-inl.h │ │ │ │ │ ├── stacktrace_x86-inl.h │ │ │ │ │ ├── stamp-h1 │ │ │ │ │ ├── static_vars.cc │ │ │ │ │ ├── static_vars.h │ │ │ │ │ ├── symbolize.cc │ │ │ │ │ ├── symbolize.h │ │ │ │ │ ├── system-alloc.cc │ │ │ │ │ ├── system-alloc.h │ │ │ │ │ ├── tcmalloc.cc │ │ │ │ │ ├── tcmalloc.h │ │ │ │ │ ├── tcmalloc_guard.h │ │ │ │ │ ├── thread_cache.cc │ │ │ │ │ └── thread_cache.h │ │ │ └── ht.cpp │ │ ├── Makefile │ │ ├── README.md │ │ └── make_script.sh │ ├── Unsecure │ │ ├── .gitignore │ │ ├── App.c │ │ ├── App.h │ │ ├── Makefile │ │ ├── README.md │ │ └── expr.sh │ ├── Unsecure_kvs │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── expr.sh │ │ ├── server.c │ │ └── server.h │ └── workloads │ │ ├── .gitignore │ │ ├── README.md │ │ ├── gen_load.py │ │ └── gen_run.py └── eleos_shieldstore │ ├── .gitignore │ └── suvm_sgx_kvs │ ├── .cproject │ ├── .project │ ├── .settings │ └── language.settings.xml │ ├── Makefile │ ├── README.md │ └── enclave_samples │ ├── App │ ├── App.cpp │ ├── ErrorSupport.cpp │ └── ErrorSupport.h │ ├── Common │ └── common.h │ ├── Enclave.token │ ├── Enclave │ ├── Enclave.config.xml │ ├── Enclave.cpp │ ├── Enclave.edl │ ├── Enclave.h │ ├── Enclave.lds │ └── Enclave_private.pem │ ├── Makefile │ ├── clean.sh │ ├── sgx_t.mk │ └── sgx_u.mk ├── Makefile ├── README.md ├── YCSB ├── .editorconfig ├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── accumulo │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── conf │ │ │ └── accumulo.properties │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── accumulo │ │ │ ├── AccumuloClient.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── accumulo │ │ │ └── AccumuloTest.java │ │ └── resources │ │ └── log4j.properties ├── aerospike │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── AerospikeClient.java │ │ └── package-info.java ├── arangodb │ ├── .gitignore │ ├── README.md │ ├── conf │ │ └── logback.xml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── ArangoDBClient.java │ │ └── package-info.java ├── arangodb3 │ ├── .gitignore │ ├── README.md │ ├── conf │ │ └── logback.xml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── arangodb │ │ ├── ArangoDB3Client.java │ │ └── package-info.java ├── asynchbase │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── AsyncHBaseClient.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ ├── google │ │ │ └── common │ │ │ │ ├── base │ │ │ │ └── Stopwatch.java │ │ │ │ └── io │ │ │ │ ├── Closeables.java │ │ │ │ └── LimitInputStream.java │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── AsyncHBaseTest.java │ │ └── resources │ │ ├── hbase-site.xml │ │ └── log4j.properties ├── azuredocumentdb │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── azuredocumentdb │ │ ├── AzureDocumentDBClient.java │ │ └── package-info.java ├── azuretablestorage │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── azuretablestorage │ │ ├── AzureClient.java │ │ └── package-info.java ├── bin │ ├── bindings.properties │ ├── ycsb │ ├── ycsb.bat │ └── ycsb.sh ├── binding-parent │ ├── datastore-specific-descriptor │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── assemblies │ │ │ └── datastore-specific-assembly.xml │ └── pom.xml ├── cassandra │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── CassandraCQLClient.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── CassandraCQLClientTest.java │ │ └── resources │ │ └── ycsb.cql ├── checkstyle.xml ├── cloudspanner │ ├── README.md │ ├── conf │ │ └── cloudspanner.properties │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── cloudspanner │ │ ├── CloudSpannerClient.java │ │ └── package-info.java ├── core │ ├── CHANGES.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ ├── BasicDB.java │ │ │ │ ├── ByteArrayByteIterator.java │ │ │ │ ├── ByteIterator.java │ │ │ │ ├── Client.java │ │ │ │ ├── CommandLine.java │ │ │ │ ├── DB.java │ │ │ │ ├── DBException.java │ │ │ │ ├── DBFactory.java │ │ │ │ ├── DBWrapper.java │ │ │ │ ├── GoodBadUglyDB.java │ │ │ │ ├── InputStreamByteIterator.java │ │ │ │ ├── RandomByteIterator.java │ │ │ │ ├── Status.java │ │ │ │ ├── StringByteIterator.java │ │ │ │ ├── TerminatorThread.java │ │ │ │ ├── UnknownDBException.java │ │ │ │ ├── Utils.java │ │ │ │ ├── Workload.java │ │ │ │ ├── WorkloadException.java │ │ │ │ ├── generator │ │ │ │ ├── AcknowledgedCounterGenerator.java │ │ │ │ ├── ConstantIntegerGenerator.java │ │ │ │ ├── CounterGenerator.java │ │ │ │ ├── DiscreteGenerator.java │ │ │ │ ├── ExponentialGenerator.java │ │ │ │ ├── FileGenerator.java │ │ │ │ ├── Generator.java │ │ │ │ ├── HistogramGenerator.java │ │ │ │ ├── HotspotIntegerGenerator.java │ │ │ │ ├── IncrementingPrintableStringGenerator.java │ │ │ │ ├── NumberGenerator.java │ │ │ │ ├── ScrambledZipfianGenerator.java │ │ │ │ ├── SequentialGenerator.java │ │ │ │ ├── SkewedLatestGenerator.java │ │ │ │ ├── UniformGenerator.java │ │ │ │ ├── UniformIntegerGenerator.java │ │ │ │ ├── UnixEpochTimestampGenerator.java │ │ │ │ ├── ZipfianGenerator.java │ │ │ │ └── package-info.java │ │ │ │ ├── measurements │ │ │ │ ├── Measurements.java │ │ │ │ ├── OneMeasurement.java │ │ │ │ ├── OneMeasurementHdrHistogram.java │ │ │ │ ├── OneMeasurementHistogram.java │ │ │ │ ├── OneMeasurementRaw.java │ │ │ │ ├── OneMeasurementTimeSeries.java │ │ │ │ ├── TwoInOneMeasurement.java │ │ │ │ ├── exporter │ │ │ │ │ ├── JSONArrayMeasurementsExporter.java │ │ │ │ │ ├── JSONMeasurementsExporter.java │ │ │ │ │ ├── MeasurementsExporter.java │ │ │ │ │ ├── TextMeasurementsExporter.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ └── workloads │ │ │ │ ├── ConstantOccupancyWorkload.java │ │ │ │ ├── CoreWorkload.java │ │ │ │ ├── RestWorkload.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── project.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ ├── TestByteIterator.java │ │ ├── TestStatus.java │ │ ├── TestUtils.java │ │ ├── generator │ │ ├── AcknowledgedCounterGeneratorTest.java │ │ ├── TestIncrementingPrintableStringGenerator.java │ │ ├── TestUnixEpochTimestampGenerator.java │ │ └── TestZipfianGenerator.java │ │ ├── measurements │ │ └── exporter │ │ │ └── TestMeasurementsExporter.java │ │ └── workloads │ │ └── TestCoreWorkload.java ├── couchbase │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── CouchbaseClient.java │ │ └── package-info.java ├── couchbase2 │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── couchbase2 │ │ ├── Couchbase2Client.java │ │ └── package-info.java ├── distribution │ ├── pom.xml │ └── src │ │ └── main │ │ └── assembly │ │ └── distribution.xml ├── doc │ ├── coreproperties.html │ ├── coreworkloads.html │ ├── dblayer.html │ ├── images │ │ ├── ycsb.jpg │ │ └── ycsblogo-small.png │ ├── index.html │ ├── parallelclients.html │ ├── tipsfaq.html │ └── workload.html ├── dynamodb │ ├── README.md │ ├── conf │ │ ├── AWSCredentials.properties │ │ └── dynamodb.properties │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── DynamoDBClient.java │ │ │ └── package-info.java │ │ └── resources │ │ └── log4j.properties ├── elasticsearch │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── ElasticsearchClient.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── ElasticsearchClientTest.java ├── geode │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── GeodeClient.java │ │ └── package-info.java ├── googlebigtable │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── GoogleBigtableClient.java │ │ └── package-info.java ├── googledatastore │ ├── README.md │ ├── conf │ │ └── googledatastore.properties │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── GoogleDatastoreClient.java │ │ │ └── package-info.java │ │ └── resources │ │ └── log4j.properties ├── hbase094 │ ├── README.md │ └── pom.xml ├── hbase098 │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── HBaseClient.java │ │ └── package-info.java ├── hbase10 │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── HBaseClient10.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── HBaseClient10Test.java │ │ └── resources │ │ ├── hbase-site.xml │ │ └── log4j.properties ├── hypertable │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── HypertableClient.java │ │ └── package-info.java ├── infinispan │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ ├── infinispan-config.xml │ │ └── remote-cache.properties │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── InfinispanClient.java │ │ ├── InfinispanRemoteClient.java │ │ ├── RemoteCacheManagerHolder.java │ │ └── package-info.java ├── jdbc │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── conf │ │ │ ├── db.properties │ │ │ └── h2.properties │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ ├── JdbcDBCli.java │ │ │ │ ├── JdbcDBClient.java │ │ │ │ ├── JdbcDBCreateTable.java │ │ │ │ ├── StatementType.java │ │ │ │ ├── flavors │ │ │ │ ├── DBFlavor.java │ │ │ │ ├── DefaultDBFlavor.java │ │ │ │ ├── PhoenixDBFlavor.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── sql │ │ │ ├── README.md │ │ │ ├── create_table.mysql │ │ │ └── create_table.sql │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── JdbcDBClientTest.java ├── kudu │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ └── log4j.properties │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── KuduYCSBClient.java │ │ │ └── package-info.java │ │ └── resources │ │ └── log4j.properties ├── kvtracer │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── KVTracerClient.java ├── mapkeeper │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── MapKeeperClient.java ├── memcached │ ├── README.md │ ├── conf │ │ └── memcached.properties │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── MemcachedClient.java │ │ └── package-info.java ├── mongodb │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ ├── AsyncMongoDbClient.java │ │ │ │ ├── MongoDbClient.java │ │ │ │ ├── OptionsSupport.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ ├── log4j.properties │ │ │ └── logback.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── AbstractDBTestCases.java │ │ ├── AsyncMongoDbClientTest.java │ │ ├── MongoDbClientTest.java │ │ └── OptionsSupportTest.java ├── nosqldb │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ ├── nosqldb.properties │ │ └── script.txt │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── NoSqlDbClient.java │ │ └── package-info.java ├── orientdb │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ ├── OrientDBClient.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── log4j.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── OrientDBClientTest.java ├── pom.xml ├── rados │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── RadosClient.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── RadosClientTest.java ├── redis │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── RedisClient.java │ │ └── package-info.java ├── rest │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── webservice │ │ │ └── rest │ │ │ ├── RestClient.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── webservice │ │ │ └── rest │ │ │ ├── IntegrationTest.java │ │ │ ├── ResourceLoader.java │ │ │ ├── RestClientTest.java │ │ │ ├── RestTestResource.java │ │ │ └── Utils.java │ │ └── resources │ │ ├── WebContent │ │ └── index.html │ │ ├── error_trace.txt │ │ ├── trace.txt │ │ └── workload_rest ├── riak │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ └── riak │ │ │ │ ├── RiakKVClient.java │ │ │ │ ├── RiakUtils.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── riak.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ └── riak │ │ └── RiakKVClientTest.java ├── s3 │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ └── s3.properties │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── S3Client.java │ │ └── package-info.java ├── solr │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ └── solr │ │ │ │ ├── SolrClient.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── log4j.properties │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── solr │ │ │ ├── SolrClientBaseTest.java │ │ │ ├── SolrClientCloudTest.java │ │ │ └── SolrClientTest.java │ │ └── resources │ │ ├── log4j.properties │ │ └── solr_config │ │ ├── schema.xml │ │ └── solrconfig.xml ├── solr6 │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── yahoo │ │ │ │ └── ycsb │ │ │ │ └── db │ │ │ │ └── solr6 │ │ │ │ ├── SolrClient.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── log4j.properties │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ └── solr6 │ │ │ ├── SolrClientBaseTest.java │ │ │ ├── SolrClientCloudTest.java │ │ │ └── SolrClientTest.java │ │ └── resources │ │ ├── log4j.properties │ │ └── solr_config │ │ ├── schema.xml │ │ └── solrconfig.xml ├── tarantool │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ ├── tarantool-hash.lua │ │ └── tarantool-tree.lua │ │ └── java │ │ └── com │ │ └── yahoo │ │ └── ycsb │ │ └── db │ │ ├── TarantoolClient.java │ │ └── package-info.java ├── trace_gen.sh ├── voldemort │ ├── pom.xml │ └── src │ │ └── main │ │ ├── conf │ │ ├── cluster.xml │ │ ├── server.properties │ │ └── stores.xml │ │ ├── java │ │ └── com │ │ │ └── yahoo │ │ │ └── ycsb │ │ │ └── db │ │ │ ├── VoldemortClient.java │ │ │ └── package-info.java │ │ └── resources │ │ └── config │ │ ├── cluster.xml │ │ ├── server.properties │ │ └── stores.xml └── workloads │ ├── workload_template │ ├── workloada │ ├── workloadb │ ├── workloadc │ ├── workloadd │ ├── workloadf │ ├── workloadg │ ├── workloadh │ └── workloadi ├── client ├── .gitignore ├── Makefile ├── README.md ├── client_load.c ├── client_run.c └── traces │ ├── trace_load.txt │ └── trace_run.txt ├── libsgx_tcmalloc.a └── make_script.sh /.gitignore: -------------------------------------------------------------------------------- 1 | App/*.o 2 | App/Enclave_u.c 3 | App/Enclave_u.h 4 | Enclave/*.o 5 | Enclave/Enclave_t.c 6 | Enclave/Enclave_t.h 7 | Enclave/gperftools/gperftools-2.5/src/*.o 8 | Enclave/gperftools/gperftools-2.5/src/base/*.o 9 | client/load 10 | client/run 11 | app 12 | libenclave.signed.so 13 | libenclave.so 14 | result.txt 15 | -------------------------------------------------------------------------------- /App/App.h: -------------------------------------------------------------------------------- 1 | #ifndef APP_H_ 2 | #define APP_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Enclave_u.h" 12 | #include "sgx_urts.h" 13 | 14 | void help(); 15 | void parse_option(); 16 | int setNonblocking(int fd); 17 | void configuration_init(); 18 | MACbuffer * macbuffer_create(int size); 19 | hashtable * ht_create(int size); 20 | sgx_status_t load_and_initialize_enclave(sgx_enclave_id_t *eid); 21 | void *load_and_initialize_threads(void *temp); 22 | void* EnclaveResponderThread(void* hotEcallAsVoidP); 23 | 24 | /** OCALLS **/ 25 | void message_return(char* ret, size_t ret_size, int client_sock); 26 | void* sbrk_o(size_t size); 27 | void print(const char *str); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /App/ocalls.cpp: -------------------------------------------------------------------------------- 1 | #include "App.h" 2 | 3 | /** 4 | * Ocall function for returning results to client 5 | **/ 6 | void message_return(char* ret, size_t ret_size, int client_sock) 7 | { 8 | if(write(client_sock, ret, ret_size) <= 0) 9 | { 10 | close(client_sock); 11 | return; 12 | } 13 | } 14 | 15 | /** 16 | * Ocall function for allocating untrusted memory 17 | **/ 18 | void* sbrk_o(size_t size) 19 | { 20 | void* result = NULL; 21 | result = sbrk((intptr_t)size); 22 | return result; 23 | } 24 | 25 | /** 26 | * Ocall function for debugging 27 | **/ 28 | void print(const char *str){ 29 | printf("--------------------\n"); 30 | printf("%s\n", str); 31 | printf("--------------------\n"); 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /Common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H 2 | #define __COMMON_H 3 | 4 | #include 5 | 6 | /* PREDEFINED DATA */ 7 | #define MAC_SIZE 16 8 | #define NAC_SIZE 16 9 | 10 | /* MAC BUffer */ 11 | struct mac_entry{ 12 | int size; 13 | uint8_t mac[MAC_SIZE*30]; 14 | }; 15 | typedef struct mac_entry MACentry; 16 | 17 | struct macbuffer{ 18 | MACentry* entry; 19 | }; 20 | typedef struct macbuffer MACbuffer; 21 | 22 | struct hashtable{ 23 | int size; 24 | struct entry **table; 25 | }; 26 | typedef struct hashtable hashtable; 27 | 28 | /* DATA STRUCTURE DECLARATION */ 29 | struct entry{ 30 | uint32_t key_size; // key size 31 | uint32_t val_size; // value size 32 | uint8_t key_hash; // key hint 33 | char* key_val; // concaternated key and value 34 | uint8_t nac[NAC_SIZE]; // This field store nonce + counter 35 | uint8_t mac[MAC_SIZE]; // This field stores MAC of data entry fields 36 | struct entry *next; // next entry 37 | }; 38 | typedef struct entry entry; 39 | 40 | struct job{ 41 | int client_sock; 42 | char* buf ; 43 | }; 44 | typedef struct job job; 45 | 46 | typedef struct { 47 | char* buf; 48 | int client_sock_; 49 | int num_clients_; 50 | } EcallParams; 51 | 52 | struct argument { 53 | int port_num; 54 | int num_threads; 55 | int max_buf_size; 56 | int bucket_size; 57 | int tree_root_size; 58 | bool key_opt; 59 | bool mac_opt; 60 | }; 61 | typedef struct argument Arg; 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x40000 5 | 0x100000000 6 | 8 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | // Import the Ocalls for trusted mutex 3 | from "sgx_tstdc.edl" import *; 4 | 5 | include "sgx_thread.h" 6 | include "common.h" 7 | include "hot_calls.h" 8 | 9 | trusted { 10 | public void enclave_init_values([in] hashtable* ht, [in] MACbuffer* MACbuf, Arg arg); 11 | public void enclave_worker_thread([in] hashtable *ht, [in] MACbuffer *MACbuf); 12 | public void EcallStartResponder( [user_check] HotCall* fastEcall ); 13 | }; 14 | untrusted { 15 | void message_return([in, size = ret_size] char* ret, size_t ret_size, int client_sock); 16 | void* sbrk_o(size_t size); 17 | void print([in, string] const char *str); 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Enclave/gperftools/README: -------------------------------------------------------------------------------- 1 | Please, download the latest gperftools code from: https://github.com/gperftools/gperftools 2 | The Intel(R) SGX tcmalloc is based on gperftools-2.5 (the latest version avaialble at the release date). 3 | 4 | Do the following to enable tcmalloc in Intel(R) SGX: 5 | 1. Copy libsgx_tcmalloc.a to the Intel(R) SGX SDK installation directory. 6 | 2. Add "-Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive" into enclave linking options in the Makefile. 7 | For example: 8 | Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ 9 | -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ 10 | -Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive \ 11 | -Wl,--start-group -lsgx_tstdc -lsgx_tstdcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ 12 | -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ 13 | -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ 14 | -Wl,--defsym,__ImageBase=0 \ 15 | -Wl,--version-script=Enclave/Enclave.lds 16 | 17 | NOTE: The flags "-Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive" must be inserted before "-Wl,--start-group -lsgx_tstdc -lsgx_tstdcxx -Wl,--end-group". 18 | Otherwise, the enclave build will fail. 19 | 20 | 3. Set the enclave HeapMaxSize equal or larger than 0x900000 in Enclave.config.xml. For example: 21 | 0x900000 22 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Enclave/gperftools/gperftools-2.5/src/.dirstamp -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Enclave/gperftools/gperftools-2.5/src/base/.deps/.dirstamp -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/atomicops-internals-x86.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/dynamic_annotations.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/elf_mem_image.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_and_profiler_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_debug_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_internal_la-low_level_alloc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/logging.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/low_level_alloc_unittest-low_level_alloc.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/spinlock_internal.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/sysinfo.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/thread_lister.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.deps/vdso_support.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/base/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Enclave/gperftools/gperftools-2.5/src/base/.dirstamp -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/google/heap-checker.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | /* The code has moved to gperftools/. Use that include-directory for 31 | * new code. 32 | */ 33 | #ifdef __GNUC__ 34 | #warning "google/heap-checker.h is deprecated. Use gperftools/heap-checker.h instead" 35 | #endif 36 | #include 37 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/google/malloc_hook.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | /* The code has moved to gperftools/. Use that include-directory for 31 | * new code. 32 | */ 33 | #ifdef __GNUC__ 34 | #warning "google/malloc_hook.h is deprecated. Use gperftools/malloc_hook.h instead" 35 | #endif 36 | #include 37 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/google/profiler.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2005, Google Inc. 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /* The code has moved to gperftools/. Use that include-directory for 32 | * new code. 33 | */ 34 | #ifdef __GNUC__ 35 | #warning "google/profiler.h is deprecated. Use gperftools/profiler.h instead" 36 | #endif 37 | #include 38 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/google/stacktrace.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | /* The code has moved to gperftools/. Use that include-directory for 31 | * new code. 32 | */ 33 | #ifdef __GNUC__ 34 | #warning "google/stacktrace.h is deprecated. Use gperftools/stacktrace.h instead" 35 | #endif 36 | #include 37 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/google/tcmalloc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2003, Google Inc. 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above 11 | * copyright notice, this list of conditions and the following disclaimer 12 | * in the documentation and/or other materials provided with the 13 | * distribution. 14 | * * Neither the name of Google Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /* The code has moved to gperftools/. Use that include-directory for 32 | * new code. 33 | */ 34 | #ifdef __GNUC__ 35 | #warning "google/tcmalloc.h is deprecated. Use gperftools/tcmalloc.h instead" 36 | #endif 37 | #include 38 | -------------------------------------------------------------------------------- /Enclave/gperftools/gperftools-2.5/src/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for src/config.h 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/.gitignore: -------------------------------------------------------------------------------- 1 | App/App.o 2 | App/Enclave_u.c 3 | App/Enclave_u.h 4 | App/Enclave_u.o 5 | App/ErrorSupport.o 6 | Enclave/Enclave.o 7 | Enclave/Enclave_t.c 8 | Enclave/Enclave_t.h 9 | Enclave/Enclave_t.o 10 | app 11 | libenclave.signed.so 12 | libenclave.so 13 | result.txt 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMMON_H_ 2 | #define _COMMON_H_ 3 | 4 | #define BUF_SIZE 64 5 | 6 | #endif /* !_COMMON_H_ */ 7 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x80000 5 | 0x200000000 6 | 8 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | from "sgx_tstdc.edl" import *; 3 | 4 | include "sgx_thread.h" 5 | include "common.h" 6 | 7 | trusted { 8 | public void ht_create(int size); 9 | public void enclave_process(int count, [in, size=count] char **inst, int count2, [in, size=count2] char **inst2); 10 | public void ht_destroy(int size); 11 | }; 12 | 13 | untrusted { 14 | void print([in, string] const char *string); 15 | void print_int(int d); 16 | void dummy(); 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Enclave/Enclave.h: -------------------------------------------------------------------------------- 1 | #ifndef _ENCLAVE_H_ 2 | #define _ENCLAVE_H_ 3 | 4 | /* DATA STRUCTURE DECLARATION */ 5 | typedef struct entry { 6 | int key_size; 7 | int val_size; 8 | char *key; 9 | char *val; 10 | struct entry *next; 11 | } entry; 12 | 13 | typedef struct hashtable { 14 | int size; 15 | entry **table; 16 | } hashtable; 17 | 18 | #endif /* !_ENCLAVE_H_ */ 19 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : Baseline 2 | 3 | This experiment is for Firgure 3. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 4 | 5 | ## Build 6 | 7 | $ make SGX_MODE=HW SGX_PRERELEASE=1 8 | 9 | ## Usage 10 | 11 | $ ./app 12 | 13 | ## For various chuck size experiments 14 | 15 | $ ./expr 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/Baseline_kvs/clean.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make SGX_MODE=HW SGX_PRERELEASE=1 3 | ./app 16 4 | ./app 32 5 | ./app 48 6 | ./app 64 7 | ./app 96 8 | ./app 128 9 | ./app 256 10 | ./app 512 11 | ./app 1024 12 | ./app 2048 13 | ./app 4096 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/README.md: -------------------------------------------------------------------------------- 1 | 1. Unsecure 2 | R/W unsecure region at the untrusted region 3 | 4 | 2. SGX\_Enclave 5 | R/W enclave region at the trusted region 6 | 7 | 3. SGX\_Unprotected 8 | R/W unprotected region at the trusted region 9 | 10 | 4. Unsecure\_kvs 11 | Naive Key-Value Storage without Intel SGX 12 | 13 | 5. Baseline\_kvs 14 | Naive Key-Value Storage with Intel SGX 15 | 16 | 6. Switchless 17 | ShieldStore with Switchless call (instead of Hotcall) 18 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/.gitignore: -------------------------------------------------------------------------------- 1 | App/App.o 2 | App/Enclave_u.c 3 | App/Enclave_u.h 4 | App/Enclave_u.o 5 | App/ErrorSupport.o 6 | Enclave/Enclave.o 7 | Enclave/Enclave_t.c 8 | Enclave/Enclave_t.h 9 | Enclave/Enclave_t.o 10 | app 11 | libenclave.signed.so 12 | libenclave.so 13 | result.txt 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x40000 5 | 0x200000000 6 | 1 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | trusted { 3 | public void region_create(); 4 | public void region_touch(); 5 | public void region_read(int size); 6 | public void region_write(int size); 7 | public void region_do_nothing(int size); 8 | public void region_destroy(); 9 | }; 10 | 11 | untrusted { 12 | void print([in, string] const char *string); 13 | void print_int(int d); 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/Enclave/Enclave.h: -------------------------------------------------------------------------------- 1 | #ifndef _ENCLAVE_H_ 2 | #define _ENCLAVE_H_ 3 | 4 | #define FOOTPRINT 1024*1024*1024 5 | 6 | struct region { 7 | int addr[FOOTPRINT]; 8 | }; 9 | 10 | struct region *page; 11 | int value = 1; 12 | 13 | #endif /* !_ENCLAVE_H_ */ 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Enclave/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : SGX\_Enclave 2 | 3 | This experiment is for Firgure 2. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 4 | 5 | ## Build 6 | 7 | $ make SGX_MODE=HW SGX_PRERELEASE=1 8 | 9 | ## Usage 10 | 11 | $ ./app 12 | 13 | ## For various chuck size experiments 14 | 15 | $ ./expr 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/.gitignore: -------------------------------------------------------------------------------- 1 | App/App.o 2 | App/Enclave_u.c 3 | App/Enclave_u.h 4 | App/Enclave_u.o 5 | App/ErrorSupport.o 6 | Enclave/Enclave.o 7 | Enclave/Enclave_t.c 8 | Enclave/Enclave_t.h 9 | Enclave/Enclave_t.o 10 | app 11 | libenclave.signed.so 12 | libenclave.so 13 | result.txt 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x40000 5 | 0x200000000 6 | 1 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | include "../Include/userdef.h" 3 | 4 | trusted { 5 | public void region_read([in, out] struct region **page, int size); 6 | public void region_write([in, out] struct region **page, int size); 7 | public void region_do_nothing([in, out] struct region **page, int size); 8 | }; 9 | 10 | untrusted { 11 | void write_o(int i, int size); 12 | void print([in, string] const char *string); 13 | void print_int(int d); 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/Include/userdef.h: -------------------------------------------------------------------------------- 1 | #ifndef _USERDEF_H_ 2 | #define _USERDEF_H_ 3 | 4 | #define FOOTPRINT 1024*1024*1024 5 | 6 | struct region { 7 | int addr[FOOTPRINT]; 8 | }; 9 | 10 | #endif /* !_USERDEF_H_ */ 11 | -------------------------------------------------------------------------------- /Experiment/Motivation/SGX_Unprotected/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : SGX\_Unprotected 2 | 3 | This experiment is for Firgure 2. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 4 | 5 | ## Build 6 | 7 | $ make SGX_MODE=HW SGX_PRERELEASE=1 8 | 9 | ## Usage 10 | 11 | $ ./app 12 | 13 | ## For various chuck size experiments 14 | 15 | $ ./expr 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/App/App.h: -------------------------------------------------------------------------------- 1 | #ifndef APP_H_ 2 | #define APP_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "Enclave_u.h" 12 | #include "sgx_urts.h" 13 | 14 | void help(); 15 | void parse_option(); 16 | int setNonblocking(int fd); 17 | void configuration_init(); 18 | MACbuffer * macbuffer_create(int size); 19 | hashtable * ht_create(int size); 20 | sgx_status_t load_and_initialize_enclave(sgx_enclave_id_t *eid); 21 | void *load_and_initialize_threads(void *temp); 22 | void* EnclaveResponderThread(void* hotEcallAsVoidP); 23 | 24 | /** OCALLS **/ 25 | void message_return(char* ret, size_t ret_size, int client_sock); 26 | void* sbrk_o(size_t size); 27 | void print(const char *str); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/App/ocalls.cpp: -------------------------------------------------------------------------------- 1 | #include "App.h" 2 | 3 | /** 4 | * Ocall function for returning results to client 5 | **/ 6 | void message_return(char* ret, size_t ret_size, int client_sock) 7 | { 8 | if(write(client_sock, ret, ret_size) <= 0) 9 | { 10 | close(client_sock); 11 | return; 12 | } 13 | } 14 | 15 | /** 16 | * Ocall function for allocating untrusted memory 17 | **/ 18 | void* sbrk_o(size_t size) 19 | { 20 | void* result = NULL; 21 | result = sbrk((intptr_t)size); 22 | return result; 23 | } 24 | 25 | /** 26 | * Ocall function for debugging 27 | **/ 28 | void print(const char *str){ 29 | printf("--------------------\n"); 30 | printf("%s\n", str); 31 | printf("--------------------\n"); 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H 2 | #define __COMMON_H 3 | 4 | #include 5 | 6 | /* PREDEFINED DATA */ 7 | #define MAC_SIZE 16 8 | #define NAC_SIZE 16 9 | 10 | /* MAC BUffer */ 11 | struct mac_entry{ 12 | int size; 13 | uint8_t mac[MAC_SIZE*30]; 14 | }; 15 | typedef struct mac_entry MACentry; 16 | 17 | struct macbuffer{ 18 | MACentry* entry; 19 | }; 20 | typedef struct macbuffer MACbuffer; 21 | 22 | struct hashtable{ 23 | int size; 24 | struct entry **table; 25 | }; 26 | typedef struct hashtable hashtable; 27 | 28 | /* DATA STRUCTURE DECLARATION */ 29 | struct entry{ 30 | uint32_t key_size; // key size 31 | uint32_t val_size; // value size 32 | uint8_t key_hash; // key hint 33 | char* key_val; // concaternated key and value 34 | uint8_t nac[NAC_SIZE]; // This field store nonce + counter 35 | uint8_t mac[MAC_SIZE]; // This field stores MAC of data entry fields 36 | struct entry *next; // next entry 37 | }; 38 | typedef struct entry entry; 39 | 40 | struct job{ 41 | int client_sock; 42 | char* buf ; 43 | }; 44 | typedef struct job job; 45 | 46 | typedef struct { 47 | char* buf; 48 | int client_sock_; 49 | int num_clients_; 50 | } EcallParams; 51 | 52 | struct argument { 53 | int port_num; 54 | int num_threads; 55 | int max_buf_size; 56 | int bucket_size; 57 | int tree_root_size; 58 | bool key_opt; 59 | bool mac_opt; 60 | }; 61 | typedef struct argument Arg; 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x40000 5 | 0x100000000 6 | 8 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | // Import the Ocalls for trusted mutex 3 | from "sgx_tstdc.edl" import *; 4 | 5 | include "sgx_thread.h" 6 | include "common.h" 7 | include "hot_calls.h" 8 | 9 | trusted { 10 | public void enclave_init_values([in] hashtable* ht, [in] MACbuffer* MACbuf, Arg arg); 11 | public void enclave_worker_thread([in] hashtable *ht, [in] MACbuffer *MACbuf); 12 | public void enclave_message_pass([user_check]void* data) transition_using_threads; 13 | }; 14 | untrusted { 15 | void message_return([in, size = ret_size] char* ret, size_t ret_size, int client_sock); 16 | void* sbrk_o(size_t size); 17 | void print([in, string] const char *str); 18 | }; 19 | }; 20 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/README: -------------------------------------------------------------------------------- 1 | Please, download the latest gperftools code from: https://github.com/gperftools/gperftools 2 | The Intel(R) SGX tcmalloc is based on gperftools-2.5 (the latest version avaialble at the release date). 3 | 4 | Do the following to enable tcmalloc in Intel(R) SGX: 5 | 1. Copy libsgx_tcmalloc.a to the Intel(R) SGX SDK installation directory. 6 | 2. Add "-Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive" into enclave linking options in the Makefile. 7 | For example: 8 | Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ 9 | -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ 10 | -Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive \ 11 | -Wl,--start-group -lsgx_tstdc -lsgx_tstdcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ 12 | -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ 13 | -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ 14 | -Wl,--defsym,__ImageBase=0 \ 15 | -Wl,--version-script=Enclave/Enclave.lds 16 | 17 | NOTE: The flags "-Wl,--whole-archive -lsgx_tcmalloc -Wl,--no-whole-archive" must be inserted before "-Wl,--start-group -lsgx_tstdc -lsgx_tstdcxx -Wl,--end-group". 18 | Otherwise, the enclave build will fail. 19 | 20 | 3. Set the enclave HeapMaxSize equal or larger than 0x900000 in Enclave.config.xml. For example: 21 | 0x900000 22 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/.dirstamp -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/.dirstamp -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/atomicops-internals-x86.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/dynamic_annotations.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/elf_mem_image.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_and_profiler_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_debug_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_internal_la-low_level_alloc.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/libtcmalloc_la-linuxthreads.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/logging.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/low_level_alloc_unittest-low_level_alloc.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/spinlock_internal.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/sysinfo.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/thread_lister.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.deps/vdso_support.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.dirstamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/base/.dirstamp -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/Enclave/gperftools/gperftools-2.5/src/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for src/config.h 2 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/README.md: -------------------------------------------------------------------------------- 1 | # ShieldStore + Switchless call 2 | 3 | ShieldStore with Switchless call is implemented for comparison with its hotcall version. 4 | 5 | ## Dependencies 6 | 7 | ### Software 8 | 9 | For the support of Intel SGX, sgx-linux should be required. 10 | 11 | Required SDK version is 2.2 (or later) for Switchless call. 12 | 13 | ## Build 14 | 15 | $ make SGX_MODE=HW SGX_PRERELEASE=1 16 | 17 | ## Usage 18 | $ ./app 19 | -------------------------------------------------------------------------------- /Experiment/Motivation/Switchless/make_script.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make SGX_MODE=HW SGX_PRERELEASE=1 3 | #./app 4 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure/.gitignore: -------------------------------------------------------------------------------- 1 | app 2 | *.o 3 | result.txt 4 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure/App.h: -------------------------------------------------------------------------------- 1 | #define FOOTPRINT 1024*1024*1024 2 | 3 | struct region { 4 | int addr[FOOTPRINT]; 5 | }; 6 | 7 | struct region *page; 8 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure/Makefile: -------------------------------------------------------------------------------- 1 | all: App 2 | 3 | App: App.c 4 | gcc App.c -o app 5 | 6 | clean: 7 | rm -rf app 8 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : Unsecure 2 | 3 | This experiment is for Firgure 2. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 4 | 5 | ## Build 6 | 7 | $ make SGX_MODE=HW SGX_PRERELEASE=1 8 | 9 | ## Usage 10 | 11 | $ ./app 12 | 13 | ## For various chuck size experiments 14 | 15 | $ ./expr 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure/expr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make clean 4 | sed -i 's/PRINT 1024/PRINT 4/' App.h 5 | make 6 | ./app 7 | 8 | make clean 9 | sed -i 's/PRINT 4/PRINT 8/' App.h 10 | make 11 | ./app 12 | 13 | make clean 14 | sed -i 's/PRINT 8/PRINT 12/' App.h 15 | make 16 | ./app 17 | 18 | make clean 19 | sed -i 's/PRINT 12/PRINT 16/' App.h 20 | make 21 | ./app 22 | 23 | make clean 24 | sed -i 's/PRINT 16/PRINT 24/' App.h 25 | make 26 | ./app 27 | 28 | make clean 29 | sed -i 's/PRINT 24/PRINT 32/' App.h 30 | make 31 | ./app 32 | 33 | make clean 34 | sed -i 's/PRINT 32/PRINT 64/' App.h 35 | make 36 | ./app 37 | 38 | make clean 39 | sed -i 's/PRINT 64/PRINT 128/' App.h 40 | make 41 | ./app 42 | 43 | make clean 44 | sed -i 's/PRINT 128/PRINT 256/' App.h 45 | make 46 | ./app 47 | 48 | make clean 49 | sed -i 's/PRINT 256/PRINT 512/' App.h 50 | make 51 | ./app 52 | 53 | make clean 54 | sed -i 's/PRINT 512/PRINT 1024/' App.h 55 | make 56 | ./app 57 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure_kvs/.gitignore: -------------------------------------------------------------------------------- 1 | app 2 | *.o 3 | result.txt 4 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure_kvs/Makefile: -------------------------------------------------------------------------------- 1 | all: server 2 | 3 | server: server.c 4 | gcc -O2 server.c -o app 5 | 6 | clean: 7 | rm -rf app 8 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure_kvs/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : NoSGX 2 | 3 | This experiment is for Firgure 3. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 4 | 5 | ## Build 6 | 7 | $ make SGX_MODE=HW SGX_PRERELEASE=1 8 | 9 | ## Usage 10 | 11 | $ ./app 12 | 13 | ## For various chuck size experiments 14 | 15 | $ ./expr 16 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure_kvs/expr.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make 3 | ./app 16 4 | ./app 32 5 | ./app 48 6 | ./app 64 7 | ./app 96 8 | ./app 128 9 | ./app 256 10 | ./app 512 11 | ./app 1024 12 | ./app 2048 13 | ./app 4096 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/Unsecure_kvs/server.h: -------------------------------------------------------------------------------- 1 | #ifndef _SERVER_H_ 2 | #define _SERVER_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /* PREDEFINED DATA */ 10 | #define BUF_SIZE 64 11 | 12 | /* DATA STRUCTURE DECLARATION */ 13 | struct entry{ 14 | int key_size; 15 | int val_size; 16 | char *key; 17 | char *val; 18 | struct entry *next; 19 | }; 20 | typedef struct entry entry; 21 | 22 | struct hashtable{ 23 | int size; 24 | struct entry **table; 25 | }; 26 | typedef struct hashtable hashtable; 27 | 28 | #endif /* !_SERVER_H_ */ 29 | 30 | -------------------------------------------------------------------------------- /Experiment/Motivation/workloads/.gitignore: -------------------------------------------------------------------------------- 1 | load_*.txt 2 | run_*.txt 3 | -------------------------------------------------------------------------------- /Experiment/Motivation/workloads/README.md: -------------------------------------------------------------------------------- 1 | # Motivation Experiment : Workload generator 2 | 3 | This workload generator is for simple, and reliable experiments for motivation. 4 | 5 | ## Usage 6 | 7 | In order to generate small workload for key loading (SET), 8 | 9 | $ ./gen_load.py 10 | 11 | Also, to generate small workload for search (GET), 12 | 13 | $ ./gen_run.py 14 | -------------------------------------------------------------------------------- /Experiment/Motivation/workloads/gen_load.py: -------------------------------------------------------------------------------- 1 | name = [16, 32, 48, 64, 96, 128, 256, 512, 1024, 2048, 4096] 2 | 3 | for r in name: 4 | f = open("load_%d.txt" % r, 'a') 5 | maxnum=16384*r 6 | for i in range(1, maxnum+1): 7 | f.write("SET %d 1\n" % i); 8 | f.close() 9 | -------------------------------------------------------------------------------- /Experiment/Motivation/workloads/gen_run.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | name = [16, 32, 48, 64, 96, 128, 256, 512, 1024, 2048, 4096] 4 | 5 | for r in name: 6 | f = open("run_%d.txt" % r, 'a') 7 | maxnum=16284*r 8 | for i in range(1, 10000001): 9 | num = random.randrange(1, maxnum) 10 | f.write("GET %d\n" % num); 11 | f.close() 12 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | samples 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | com.intel.sgx.sgxnature 27 | 28 | 29 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/Makefile: -------------------------------------------------------------------------------- 1 | ALL_UNTRUSTED_MK=$(shell find . -name '*sgx_u.mk') 2 | ALL_TRUSTED_MK=$(shell find . -name '*sgx_t.mk') 3 | ALL_STATIC_MK=$(shell find . -name '*sgx_t_static.mk') 4 | 5 | 6 | 7 | .PHONY: all clean run 8 | 9 | 10 | all clean: 11 | $(foreach U_MK, $(ALL_UNTRUSTED_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) 12 | $(foreach T_MK, $(ALL_TRUSTED_MK), $(MAKE) -C $(shell dirname $(T_MK)) -f $(shell basename $(T_MK)) $@;) 13 | $(foreach U_MK, $(ALL_STATIC_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) 14 | 15 | run: 16 | $(foreach U_MK, $(ALL_UNTRUSTED_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) 17 | 18 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/README.md: -------------------------------------------------------------------------------- 1 | # Comparison to Eleos 2 | 3 | This is sgx version of key-value store ported to "Eleos: Exit-Less OS Services for SGX Enclaves" 4 | The experiment is for Firgure 16, 17. in the paper "ShieldStore: Shielded In-memory Key-value Storage with SGX" 5 | 6 | ## Build 7 | 8 | In order to build this project, you need to download eleos [here](https://github.com/acsl-technion/eleos). 9 | After you locate this directory into root, run 10 | 11 | $ make SGX_MODE=HW SGX_PRERELEASE=1 12 | 13 | ## Usage 14 | 15 | $ ./app 16 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef _COMMON_H_ 2 | #define _COMMON_H_ 3 | 4 | /* PREDEFINED DATA */ 5 | #define KEY_SIZE 17 6 | 7 | //#define VAL_SIZE 513 8 | //#define BUF_SIZE 576 9 | 10 | //#define VAL_SIZE 1025 11 | //#define BUF_SIZE 1050 12 | 13 | #define VAL_SIZE 4097 14 | #define BUF_SIZE 4125 15 | 16 | #define THREAD_NUM 1 17 | 18 | #endif /* !_COMMON_H_ */ 19 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Enclave.token: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Enclave/Enclave.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 0 3 | 0 4 | 0x80000 5 | 0x100000000 6 | 8 7 | 1 8 | 0 9 | 0 10 | 0xFFFFFFFF 11 | 12 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Enclave/Enclave.edl: -------------------------------------------------------------------------------- 1 | enclave { 2 | from "sgx_tstdc.edl" import *; 3 | from "/home/thkim/eleos_shieldstore/eleos_core/trustedlib_lib_services/static_trusted/lib_services.edl" import *; 4 | 5 | include "sgx_thread.h" 6 | include "common.h" 7 | 8 | trusted { 9 | public void ht_create(int size); 10 | //public void sgx_event_handler([in] char buf[64], [in, out] char line[64]); 11 | public void enclave_process([in] int count[8], 12 | [in] char **inst[8], 13 | [in] int count2[8], 14 | [in] char **inst2[8]); 15 | public void ht_destroy(int size); 16 | }; 17 | 18 | untrusted { 19 | void print([in, string] const char *string); 20 | void print_int(int d); 21 | void dummy(); 22 | }; 23 | }; 24 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Enclave/Enclave.h: -------------------------------------------------------------------------------- 1 | #ifndef _ENCLAVE_H_ 2 | #define _ENCLAVE_H_ 3 | 4 | //Eleos support 5 | #include "mem.h" 6 | #include "Aptr.h" 7 | 8 | /* DATA STRUCTURE DECLARATION */ 9 | 10 | /* Decrease the working set size of shieldstore to match eleos */ 11 | typedef struct entry { 12 | char* key; 13 | char* val; 14 | //int key_size; 15 | //int val_size; 16 | struct entry* next; 17 | } entry; 18 | 19 | typedef struct hashtable { 20 | int size; 21 | struct entry **table; 22 | } hashtable; 23 | 24 | hashtable *ht; 25 | 26 | #endif /* !_ENCLAVE_H_ */ 27 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Enclave/Enclave.lds: -------------------------------------------------------------------------------- 1 | libenclave.so 2 | { 3 | global: 4 | g_global_data; 5 | enclave_entry; 6 | g_peak_heap_used; 7 | local: 8 | *; 9 | }; 10 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/Makefile: -------------------------------------------------------------------------------- 1 | #SGX_MODE ?= SIM 2 | SGX_MODE ?= HW 3 | SGX_PRERELEASE=1 4 | SGX_ARCH ?= x64 5 | EPCPP_CACHE_SIZE ?= "-DCACHE_SIZE=67108864" 6 | export EPCPP_CACHE_SIZE 7 | RANDOM_ACCESS ?= "-DAPTR_RANDOM_ACCESS" 8 | export RANDOM_ACCESS 9 | 10 | # NOSANITY="-DNOSANITY" 11 | # export NOSANITY 12 | # to disable sanity checks , uncomment 13 | all: 14 | $(MAKE) -C ../../eleos_core/trustedlib_lib_services all 15 | $(MAKE) -f sgx_u.mk all 16 | $(MAKE) -f sgx_t.mk all 17 | 18 | clean: 19 | $(MAKE) -C ../../eleos_core/trustedlib_lib_services clean 20 | $(MAKE) -f sgx_u.mk clean 21 | $(MAKE) -f sgx_t.mk clean 22 | 23 | -------------------------------------------------------------------------------- /Experiment/eleos_shieldstore/suvm_sgx_kvs/enclave_samples/clean.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make SGX_MODE=HW SGX_PRERELEASE=1 3 | #./script.sh 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShieldStore 2 | 3 | ShieldStore is a prototype of trusted in-memory key-value stores with Intel SGX based on EuroSys 2019 paper. 4 | 5 | ## Dependencies 6 | 7 | ### Hardware 8 | 9 | For supporting Intel SGX, you should use Intel CPU with at least Haswell generation. 10 | You can follow the list as below. 11 | [List of SGX supported HW](https://github.com/ayeks/SGX-hardware) 12 | 13 | ### Software 14 | 15 | For the support of Intel SGX, sgx-linux should be required. 16 | 17 | Recommanded version is 1.8 for both SDK and Driver. 18 | 19 | * [Intel SGX Linux 1.8 version](https://github.com/intel/linux-sgx/tree/sgx_1.8) 20 | * [Intel SGX Linux driver](https://github.com/intel/linux-sgx-driver/tree/sgx_driver_1.8) 21 | 22 | However, ShieldStore is available on Intel SGX SDK version 1.9, and 2.2 along with Intel SGX Driver version 1.9, 2.0, and 2.1. 23 | 24 | ## Build 25 | 26 | $ make SGX_MODE=HW SGX_PRERELEASE=1 27 | 28 | ## Build Environment 29 | 30 | Ubuntu 16.04.5 31 | 32 | For using tcmalloc in 16.04, we should download a rebuilt version of tcmalloc library from [here](https://01.org/intel-softwareguard-extensions/downloads/intel-sgx-linux-1.8-release) or use libsgx\_tcmalloc.a in this repo. 33 | 34 | Replace libsgx\_tcmalloc.a from SDK in the installed path with this version. 35 | 36 | ## Usage 37 | $ ./app 38 | 39 | First, run the server with above command, and run client. 40 | 41 | ## Paper 42 | 43 | For the details, please refer this paper. 44 | "ShieldStore: Shielded In-memory Key-value Storage with SGX" [EuroSys'19](http://calab.kaist.ac.kr:8080/~jhuh/papers/kim_eurosys19_shieldst.pdf) 45 | 46 | ## Question? 47 | 48 | If you have any question, don't hesitate to send an e-mail to [T.Kim](mailto:thkim@calab.kaist.ac.kr). 49 | 50 | From T. Kim, J. Park, J. Woo, S. Jeon J. Huh 51 | -------------------------------------------------------------------------------- /YCSB/.editorconfig: -------------------------------------------------------------------------------- 1 | # For more info, see: http://EditorConfig.org 2 | root = true 3 | 4 | [*.java] 5 | indent_style = space 6 | indent_size = 2 7 | continuation_indent_size = 4 8 | 9 | [*.md] 10 | indent_style = space 11 | indent_size = 2 12 | continuation_indent_size = 4 13 | 14 | [*.xml] 15 | indent_style = space 16 | indent_size = 2 17 | continuation_indent_size = 4 18 | -------------------------------------------------------------------------------- /YCSB/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore compiled byte code 2 | target 3 | 4 | # ignore output files from testing 5 | output* 6 | 7 | # ignore standard Eclipse files 8 | .project 9 | .classpath 10 | .settings 11 | .checkstyle 12 | 13 | # ignore standard IntelliJ files 14 | .idea/ 15 | *.iml 16 | *.ipr 17 | *.iws 18 | 19 | # ignore standard Vim and Emacs temp files 20 | *.swp 21 | *~ 22 | 23 | # ignore standard Mac OS X files/dirs 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /YCSB/.travis.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Yahoo! Inc., 2012 - 2015 YCSB contributors. 2 | # All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you 5 | # may not use this file except in compliance with the License. You 6 | # may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. See the License for the specific language governing 14 | # permissions and limitations under the License. See accompanying 15 | # LICENSE file. 16 | 17 | # more info here about TravisCI and Java projects 18 | # http://docs.travis-ci.com/user/languages/java/ 19 | 20 | language: java 21 | 22 | jdk: 23 | - oraclejdk8 24 | - oraclejdk7 25 | - openjdk7 26 | 27 | install: mvn install -q -DskipTests=true 28 | 29 | script: mvn test -q 30 | 31 | # Services to start for tests. 32 | services: 33 | - mongodb 34 | - riak 35 | 36 | 37 | # Use the Container based infrastructure. 38 | sudo: false 39 | -------------------------------------------------------------------------------- /YCSB/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | NOTICE file for use with, and corresponding to Section 4 of, 3 | the Apache License, Version 2.0, 4 | in this case for the YCSB project. 5 | ========================================================================= 6 | 7 | This product includes software developed by 8 | Yahoo! Inc. (www.yahoo.com) 9 | Copyright (c) 2010 Yahoo! Inc. All rights reserved. 10 | 11 | This product includes software developed by 12 | Google Inc. (www.google.com) 13 | Copyright (c) 2015 Google Inc. All rights reserved. 14 | -------------------------------------------------------------------------------- /YCSB/accumulo/src/main/conf/accumulo.properties: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Cloudera, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | # 16 | # Sample Accumulo configuration properties 17 | # 18 | # You may either set properties here or via the command line. 19 | # 20 | 21 | # This will influence the keys we write 22 | accumulo.columnFamily=YCSB 23 | 24 | # This should be set based on your Accumulo cluster 25 | #accumulo.instanceName=ExampleInstance 26 | 27 | # Comma separated list of host:port tuples for the ZooKeeper quorum used 28 | # by your Accumulo cluster 29 | #accumulo.zooKeepers=zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181 30 | 31 | # This user will need permissions on the table YCSB works against 32 | #accumulo.username=ycsb 33 | #accumulo.password=protectyaneck 34 | 35 | # Controls how long our client writer will wait to buffer more data 36 | # measured in milliseconds 37 | accumulo.batchWriterMaxLatency=30000 38 | 39 | # Controls how much data our client will attempt to buffer before sending 40 | # measured in bytes 41 | accumulo.batchWriterSize=100000 42 | 43 | # Controls how many worker threads our client will use to parallelize writes 44 | accumulo.batchWriterThreads=1 45 | -------------------------------------------------------------------------------- /YCSB/accumulo/src/main/java/com/yahoo/ycsb/db/accumulo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for Apache Accumulo. 20 | */ 21 | package com.yahoo.ycsb.db.accumulo; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/accumulo/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you 5 | # may not use this file except in compliance with the License. You 6 | # may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. See the License for the specific language governing 14 | # permissions and limitations under the License. See accompanying 15 | # LICENSE file. 16 | # 17 | 18 | # Root logger option 19 | log4j.rootLogger=INFO, stderr 20 | 21 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 22 | log4j.appender.stderr.target=System.err 23 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n 25 | 26 | # Suppress messages from ZooKeeper 27 | log4j.logger.com.yahoo.ycsb.db.accumulo=INFO 28 | log4j.logger.org.apache.zookeeper=ERROR 29 | log4j.logger.org.apache.accumulo=WARN 30 | -------------------------------------------------------------------------------- /YCSB/aerospike/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent 26 | 27 | 28 | aerospike-binding 29 | Aerospike DB Binding 30 | jar 31 | 32 | 33 | 34 | com.aerospike 35 | aerospike-client 36 | ${aerospike.version} 37 | 38 | 39 | com.yahoo.ycsb 40 | core 41 | ${project.version} 42 | provided 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /YCSB/aerospike/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for Areospike. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | -------------------------------------------------------------------------------- /YCSB/arangodb/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /YCSB/arangodb/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /YCSB/arangodb/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 - 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for ArangoDB. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/arangodb3/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/YCSB/arangodb3/.gitignore -------------------------------------------------------------------------------- /YCSB/arangodb3/conf/logback.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /YCSB/arangodb3/src/main/java/com/yahoo/ycsb/db/arangodb/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for ArangoDB. 20 | */ 21 | package com.yahoo.ycsb.db.arangodb; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/asynchbase/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for HBase using the AsyncHBase client. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | -------------------------------------------------------------------------------- /YCSB/asynchbase/src/test/resources/hbase-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | hbase.master.info.port 22 | -1 23 | The port for the hbase master web UI 24 | Set to -1 if you do not want the info server to run. 25 | 26 | 27 | 28 | hbase.regionserver.info.port 29 | -1 30 | The port for the hbase regionserver web UI 31 | Set to -1 if you do not want the info server to run. 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /YCSB/asynchbase/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you 5 | # may not use this file except in compliance with the License. You 6 | # may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. See the License for the specific language governing 14 | # permissions and limitations under the License. See accompanying 15 | # LICENSE file. 16 | # 17 | 18 | # Root logger option 19 | log4j.rootLogger=WARN, stderr 20 | 21 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 22 | log4j.appender.stderr.target=System.err 23 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n 25 | 26 | # Suppress messages from ZKTableStateManager: Creates a large number of table 27 | # state change messages. 28 | log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKTableStateManager=ERROR 29 | -------------------------------------------------------------------------------- /YCSB/azuredocumentdb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent/ 26 | 27 | 28 | azuredocumentdb-binding 29 | Azure DocumentDB Binding 30 | 31 | 32 | com.microsoft.azure 33 | azure-documentdb 34 | ${azuredocumentdb.version} 35 | 36 | 37 | com.yahoo.ycsb 38 | core 39 | ${project.version} 40 | provided 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /YCSB/azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 YCSB Contributors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Azure DocumentDB. 20 | */ 21 | package com.yahoo.ycsb.db.azuredocumentdb; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/azuretablestorage/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 4.0.0 22 | 23 | com.yahoo.ycsb 24 | binding-parent 25 | 0.13.0-SNAPSHOT 26 | ../binding-parent 27 | 28 | 29 | azuretablestorage-binding 30 | Azure table storage Binding 31 | jar 32 | 33 | 34 | 35 | com.yahoo.ycsb 36 | core 37 | ${project.version} 38 | provided 39 | 40 | 41 | com.microsoft.azure 42 | azure-storage 43 | ${azurestorage.version} 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /YCSB/azuretablestorage/src/main/java/com/yahoo/ycsb/db/azuretablestorage/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Azure table Storage. 20 | */ 21 | package com.yahoo.ycsb.db.azuretablestorage; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/binding-parent/datastore-specific-descriptor/pom.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 4.0.0 20 | 21 | 22 | com.yahoo.ycsb 23 | root 24 | 0.13.0-SNAPSHOT 25 | ../../ 26 | 27 | 28 | datastore-specific-descriptor 29 | Per Datastore Binding descriptor 30 | jar 31 | 32 | 33 | This module contains the assembly descriptor used by the individual components 34 | to build binding-specific distributions. 35 | 36 | 37 | 38 | com.yahoo.ycsb 39 | core 40 | ${project.version} 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /YCSB/cassandra/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Cassandra 20 | * 2.1+ via CQL. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | 24 | -------------------------------------------------------------------------------- /YCSB/cassandra/src/test/resources/ycsb.cql: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB Contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | CREATE TABLE usertable ( 19 | y_id varchar primary key, 20 | field0 varchar, 21 | field1 varchar, 22 | field2 varchar, 23 | field3 varchar, 24 | field4 varchar, 25 | field5 varchar, 26 | field6 varchar, 27 | field7 varchar, 28 | field8 varchar, 29 | field9 varchar); 30 | -------------------------------------------------------------------------------- /YCSB/cloudspanner/conf/cloudspanner.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # Core YCSB properties. 17 | table = usertable 18 | zeropadding = 12 19 | 20 | # Cloud Spanner properties 21 | cloudspanner.instance = ycsb-instance 22 | cloudspanner.database = ycsb-database 23 | 24 | cloudspanner.readmode = query 25 | cloudspanner.boundedstaleness = 0 26 | cloudspanner.batchinserts = 1 27 | -------------------------------------------------------------------------------- /YCSB/cloudspanner/src/main/java/com/yahoo/ycsb/db/cloudspanner/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Google's 20 | * Cloud Spanner. 21 | */ 22 | package com.yahoo.ycsb.db.cloudspanner; 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/ByteArrayByteIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb; 18 | 19 | /** 20 | * A ByteIterator that iterates through a byte array. 21 | */ 22 | public class ByteArrayByteIterator extends ByteIterator { 23 | private byte[] str; 24 | private int off; 25 | private final int len; 26 | 27 | public ByteArrayByteIterator(byte[] s) { 28 | this.str = s; 29 | this.off = 0; 30 | this.len = s.length; 31 | } 32 | 33 | public ByteArrayByteIterator(byte[] s, int off, int len) { 34 | this.str = s; 35 | this.off = off; 36 | this.len = off + len; 37 | } 38 | 39 | @Override 40 | public boolean hasNext() { 41 | return off < len; 42 | } 43 | 44 | @Override 45 | public byte nextByte() { 46 | byte ret = str[off]; 47 | off++; 48 | return ret; 49 | } 50 | 51 | @Override 52 | public long bytesLeft() { 53 | return len - off; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/DBException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb; 19 | 20 | /** 21 | * Something bad happened while interacting with the database. 22 | */ 23 | public class DBException extends Exception { 24 | /** 25 | * 26 | */ 27 | private static final long serialVersionUID = 6646883591588721475L; 28 | 29 | public DBException(String message) { 30 | super(message); 31 | } 32 | 33 | public DBException() { 34 | super(); 35 | } 36 | 37 | public DBException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | 41 | public DBException(Throwable cause) { 42 | super(cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/DBFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb; 19 | 20 | import org.apache.htrace.core.Tracer; 21 | 22 | import java.util.Properties; 23 | 24 | /** 25 | * Creates a DB layer by dynamically classloading the specified DB class. 26 | */ 27 | public final class DBFactory { 28 | private DBFactory() { 29 | // not used 30 | } 31 | 32 | public static DB newDB(String dbname, Properties properties, final Tracer tracer) throws UnknownDBException { 33 | ClassLoader classLoader = DBFactory.class.getClassLoader(); 34 | 35 | DB ret; 36 | 37 | try { 38 | Class dbclass = classLoader.loadClass(dbname); 39 | 40 | ret = (DB) dbclass.newInstance(); 41 | } catch (Exception e) { 42 | e.printStackTrace(); 43 | return null; 44 | } 45 | 46 | ret.setProperties(properties); 47 | 48 | return new DBWrapper(ret, tracer); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/InputStreamByteIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb; 18 | 19 | import java.io.InputStream; 20 | 21 | /** 22 | * A ByteIterator that iterates through an inputstream of bytes. 23 | */ 24 | public class InputStreamByteIterator extends ByteIterator { 25 | private long len; 26 | private InputStream ins; 27 | private long off; 28 | 29 | public InputStreamByteIterator(InputStream ins, long len) { 30 | this.len = len; 31 | this.ins = ins; 32 | off = 0; 33 | } 34 | 35 | @Override 36 | public boolean hasNext() { 37 | return off < len; 38 | } 39 | 40 | @Override 41 | public byte nextByte() { 42 | int ret; 43 | try { 44 | ret = ins.read(); 45 | } catch (Exception e) { 46 | throw new IllegalStateException(e); 47 | } 48 | if (ret == -1) { 49 | throw new IllegalStateException("Past EOF!"); 50 | } 51 | off++; 52 | return (byte) ret; 53 | } 54 | 55 | @Override 56 | public long bytesLeft() { 57 | return len - off; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/UnknownDBException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb; 19 | 20 | /** 21 | * Could not create the specified DB. 22 | */ 23 | public class UnknownDBException extends Exception { 24 | /** 25 | * 26 | */ 27 | private static final long serialVersionUID = 459099842269616836L; 28 | 29 | public UnknownDBException(String message) { 30 | super(message); 31 | } 32 | 33 | public UnknownDBException() { 34 | super(); 35 | } 36 | 37 | public UnknownDBException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | 41 | public UnknownDBException(Throwable cause) { 42 | super(cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/WorkloadException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb; 19 | 20 | /** 21 | * The workload tried to do something bad. 22 | */ 23 | public class WorkloadException extends Exception { 24 | /** 25 | * 26 | */ 27 | private static final long serialVersionUID = 8844396756042772132L; 28 | 29 | public WorkloadException(String message) { 30 | super(message); 31 | } 32 | 33 | public WorkloadException() { 34 | super(); 35 | } 36 | 37 | public WorkloadException(String message, Throwable cause) { 38 | super(message, cause); 39 | } 40 | 41 | public WorkloadException(Throwable cause) { 42 | super(cause); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/ConstantIntegerGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.generator; 18 | 19 | /** 20 | * A trivial integer generator that always returns the same value. 21 | * 22 | */ 23 | public class ConstantIntegerGenerator extends NumberGenerator { 24 | private final int i; 25 | 26 | /** 27 | * @param i The integer that this generator will always return. 28 | */ 29 | public ConstantIntegerGenerator(int i) { 30 | this.i = i; 31 | } 32 | 33 | @Override 34 | public Integer nextValue() { 35 | return i; 36 | } 37 | 38 | @Override 39 | public double mean() { 40 | return i; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.generator; 19 | 20 | import java.util.concurrent.atomic.AtomicInteger; 21 | 22 | /** 23 | * Generates a sequence of integers. 24 | * (0, 1, ...) 25 | */ 26 | public class CounterGenerator extends NumberGenerator { 27 | private final AtomicInteger counter; 28 | 29 | /** 30 | * Create a counter that starts at countstart. 31 | */ 32 | public CounterGenerator(int countstart) { 33 | counter = new AtomicInteger(countstart); 34 | } 35 | 36 | @Override 37 | public Integer nextValue() { 38 | return counter.getAndIncrement(); 39 | } 40 | 41 | @Override 42 | public Integer lastValue() { 43 | return counter.get() - 1; 44 | } 45 | 46 | @Override 47 | public double mean() { 48 | throw new UnsupportedOperationException("Can't compute mean of non-stationary distribution!"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/Generator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.generator; 19 | 20 | /** 21 | * An expression that generates a sequence of values, following some distribution (Uniform, Zipfian, Sequential, etc.). 22 | */ 23 | public abstract class Generator { 24 | /** 25 | * Generate the next value in the distribution. 26 | */ 27 | public abstract V nextValue(); 28 | 29 | /** 30 | * Return the previous value generated by the distribution; e.g., returned from the last {@link Generator#nextValue()} 31 | * call. 32 | * Calling {@link #lastValue()} should not advance the distribution or have any side effects. If {@link #nextValue()} 33 | * has not yet been called, {@link #lastValue()} should return something reasonable. 34 | */ 35 | public abstract V lastValue(); 36 | 37 | public final String nextString() { 38 | V ret = nextValue(); 39 | return ret == null ? null : ret.toString(); 40 | } 41 | 42 | public final String lastString() { 43 | V ret = lastValue(); 44 | return ret == null ? null : ret.toString(); 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/NumberGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.generator; 19 | 20 | /** 21 | * A generator that is capable of generating numeric values. 22 | * 23 | */ 24 | public abstract class NumberGenerator extends Generator { 25 | private Number lastVal; 26 | 27 | /** 28 | * Set the last value generated. NumberGenerator subclasses must use this call 29 | * to properly set the last value, or the {@link #lastValue()} calls won't work. 30 | */ 31 | protected void setLastValue(Number last) { 32 | lastVal = last; 33 | } 34 | 35 | 36 | @Override 37 | public Number lastValue() { 38 | return lastVal; 39 | } 40 | 41 | /** 42 | * Return the expected value (mean) of the values this generator will return. 43 | */ 44 | public abstract double mean(); 45 | } 46 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/UniformIntegerGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.generator; 19 | 20 | import com.yahoo.ycsb.Utils; 21 | 22 | /** 23 | * Generates integers randomly uniform from an interval. 24 | */ 25 | public class UniformIntegerGenerator extends NumberGenerator { 26 | private final int lb, ub, interval; 27 | 28 | /** 29 | * Creates a generator that will return integers uniformly randomly from the interval [lb,ub] inclusive. 30 | * (lb and ub are possible values). 31 | * 32 | * @param lb the lower bound (inclusive) of generated values 33 | * @param ub the upper bound (inclusive) of generated values 34 | */ 35 | public UniformIntegerGenerator(int lb, int ub) { 36 | this.lb = lb; 37 | this.ub = ub; 38 | interval = this.ub - this.lb + 1; 39 | } 40 | 41 | @Override 42 | public Integer nextValue() { 43 | int ret = Utils.random().nextInt(interval) + lb; 44 | setLastValue(ret); 45 | 46 | return ret; 47 | } 48 | 49 | @Override 50 | public double mean() { 51 | return ((lb + (long) ub)) / 2.0; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/generator/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB generator package. 20 | */ 21 | package com.yahoo.ycsb.generator; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/measurements/exporter/MeasurementsExporter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.measurements.exporter; 18 | 19 | import java.io.Closeable; 20 | import java.io.IOException; 21 | 22 | /** 23 | * Used to export the collected measurements into a useful format, for example 24 | * human readable text or machine readable JSON. 25 | */ 26 | public interface MeasurementsExporter extends Closeable { 27 | /** 28 | * Write a measurement to the exported format. 29 | * 30 | * @param metric Metric name, for example "READ LATENCY". 31 | * @param measurement Measurement name, for example "Average latency". 32 | * @param i Measurement to write. 33 | * @throws IOException if writing failed 34 | */ 35 | void write(String metric, String measurement, int i) throws IOException; 36 | 37 | /** 38 | * Write a measurement to the exported format. 39 | * 40 | * @param metric Metric name, for example "READ LATENCY". 41 | * @param measurement Measurement name, for example "Average latency". 42 | * @param d Measurement to write. 43 | * @throws IOException if writing failed 44 | */ 45 | void write(String metric, String measurement, double d) throws IOException; 46 | } 47 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/measurements/exporter/TextMeasurementsExporter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010-2016 Yahoo! Inc., 2017 YCSB contributors All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.measurements.exporter; 18 | 19 | import java.io.BufferedWriter; 20 | import java.io.IOException; 21 | import java.io.OutputStream; 22 | import java.io.OutputStreamWriter; 23 | 24 | /** 25 | * Write human readable text. Tries to emulate the previous print report method. 26 | */ 27 | public class TextMeasurementsExporter implements MeasurementsExporter { 28 | private final BufferedWriter bw; 29 | 30 | public TextMeasurementsExporter(OutputStream os) { 31 | this.bw = new BufferedWriter(new OutputStreamWriter(os)); 32 | } 33 | 34 | public void write(String metric, String measurement, int i) throws IOException { 35 | bw.write("[" + metric + "], " + measurement + ", " + i); 36 | bw.newLine(); 37 | } 38 | 39 | public void write(String metric, String measurement, double d) throws IOException { 40 | bw.write("[" + metric + "], " + measurement + ", " + d); 41 | bw.newLine(); 42 | } 43 | 44 | public void close() throws IOException { 45 | this.bw.close(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/measurements/exporter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB measurements.exporter package. 20 | */ 21 | package com.yahoo.ycsb.measurements.exporter; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/measurements/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB measurements package. 20 | */ 21 | package com.yahoo.ycsb.measurements; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 - 2017 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB core package. 20 | */ 21 | package com.yahoo.ycsb; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/java/com/yahoo/ycsb/workloads/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB workloads. 20 | */ 21 | package com.yahoo.ycsb.workloads; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/core/src/main/resources/project.properties: -------------------------------------------------------------------------------- 1 | version=${project.version} 2 | -------------------------------------------------------------------------------- /YCSB/core/src/test/java/com/yahoo/ycsb/TestByteIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb; 19 | 20 | import org.testng.annotations.Test; 21 | import static org.testng.AssertJUnit.*; 22 | 23 | public class TestByteIterator { 24 | @Test 25 | public void testRandomByteIterator() { 26 | int size = 100; 27 | ByteIterator itor = new RandomByteIterator(size); 28 | assertTrue(itor.hasNext()); 29 | assertEquals(size, itor.bytesLeft()); 30 | assertEquals(size, itor.toString().getBytes().length); 31 | assertFalse(itor.hasNext()); 32 | assertEquals(0, itor.bytesLeft()); 33 | 34 | itor = new RandomByteIterator(size); 35 | assertEquals(size, itor.toArray().length); 36 | assertFalse(itor.hasNext()); 37 | assertEquals(0, itor.bytesLeft()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /YCSB/core/src/test/java/com/yahoo/ycsb/TestStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb; 18 | 19 | import org.testng.annotations.Test; 20 | 21 | import static org.testng.Assert.assertFalse; 22 | import static org.testng.Assert.assertTrue; 23 | 24 | /** 25 | * Test class for {@link Status}. 26 | */ 27 | public class TestStatus { 28 | 29 | @Test 30 | public void testAcceptableStatus() { 31 | assertTrue(Status.OK.isOk()); 32 | assertTrue(Status.BATCHED_OK.isOk()); 33 | assertFalse(Status.BAD_REQUEST.isOk()); 34 | assertFalse(Status.ERROR.isOk()); 35 | assertFalse(Status.FORBIDDEN.isOk()); 36 | assertFalse(Status.NOT_FOUND.isOk()); 37 | assertFalse(Status.NOT_IMPLEMENTED.isOk()); 38 | assertFalse(Status.SERVICE_UNAVAILABLE.isOk()); 39 | assertFalse(Status.UNEXPECTED_STATE.isOk()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /YCSB/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010 Yahoo! Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.generator; 19 | 20 | import org.testng.annotations.Test; 21 | 22 | import static org.testng.AssertJUnit.assertFalse; 23 | 24 | 25 | public class TestZipfianGenerator { 26 | @Test 27 | public void testMinAndMaxParameter() { 28 | long min = 5; 29 | long max = 10; 30 | ZipfianGenerator zipfian = new ZipfianGenerator(min, max); 31 | 32 | for (int i = 0; i < 10000; i++) { 33 | long rnd = zipfian.nextValue(); 34 | assertFalse(rnd < min); 35 | assertFalse(rnd > max); 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /YCSB/couchbase/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Couchbase. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/couchbase2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 22 | 4.0.0 23 | 24 | com.yahoo.ycsb 25 | binding-parent 26 | 0.13.0-SNAPSHOT 27 | ../binding-parent 28 | 29 | 30 | couchbase2-binding 31 | Couchbase Java SDK 2.x Binding 32 | jar 33 | 34 | 35 | 36 | com.couchbase.client 37 | java-client 38 | ${couchbase2.version} 39 | 40 | 41 | com.yahoo.ycsb 42 | core 43 | ${project.version} 44 | provided 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /YCSB/couchbase2/src/main/java/com/yahoo/ycsb/db/couchbase2/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 - 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Couchbase, new driver. 20 | */ 21 | package com.yahoo.ycsb.db.couchbase2; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/doc/images/ycsb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/YCSB/doc/images/ycsb.jpg -------------------------------------------------------------------------------- /YCSB/doc/images/ycsblogo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/YCSB/doc/images/ycsblogo-small.png -------------------------------------------------------------------------------- /YCSB/dynamodb/conf/AWSCredentials.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # Fill in your AWS Access Key ID and Secret Access Key 17 | # http://aws.amazon.com/security-credentials 18 | #accessKey = 19 | #secretKey = 20 | -------------------------------------------------------------------------------- /YCSB/dynamodb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 4.0.0 22 | 23 | com.yahoo.ycsb 24 | binding-parent 25 | 0.13.0-SNAPSHOT 26 | ../binding-parent 27 | 28 | 29 | dynamodb-binding 30 | DynamoDB DB Binding 31 | 32 | 33 | 34 | com.amazonaws 35 | aws-java-sdk 36 | 1.10.48 37 | 38 | 39 | log4j 40 | log4j 41 | 1.2.17 42 | 43 | 44 | com.yahoo.ycsb 45 | core 46 | ${project.version} 47 | provided 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /YCSB/dynamodb/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 YCSB Contributors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for DynamoDB. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/dynamodb/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | #define the console appender 17 | log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender 18 | 19 | # now define the layout for the appender 20 | log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout 21 | log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x -%m%n 22 | 23 | # now map our console appender as a root logger, means all log messages will go 24 | # to this appender 25 | log4j.rootLogger = INFO, consoleAppender 26 | -------------------------------------------------------------------------------- /YCSB/elasticsearch/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for 20 | * Elasticsearch. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | 24 | -------------------------------------------------------------------------------- /YCSB/geode/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent 26 | 27 | 28 | geode-binding 29 | Geode DB Binding 30 | jar 31 | 32 | 33 | 34 | org.apache.geode 35 | geode-core 36 | ${geode.version} 37 | 38 | 39 | com.yahoo.ycsb 40 | core 41 | ${project.version} 42 | provided 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /YCSB/geode/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014-2016, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for Apache Geode (incubating). 20 | */ 21 | package com.yahoo.ycsb.db; -------------------------------------------------------------------------------- /YCSB/googlebigtable/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent/ 26 | 27 | 28 | googlebigtable-binding 29 | Google Cloud Bigtable Binding 30 | jar 31 | 32 | 33 | 34 | com.google.cloud.bigtable 35 | bigtable-hbase-1.0 36 | ${googlebigtable.version} 37 | 38 | 39 | 40 | com.yahoo.ycsb 41 | core 42 | ${project.version} 43 | provided 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /YCSB/googlebigtable/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Google's 20 | * Bigtable. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | -------------------------------------------------------------------------------- /YCSB/googledatastore/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for 20 | Google Cloud Datastore. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | -------------------------------------------------------------------------------- /YCSB/googledatastore/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | #define the console appender 17 | log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender 18 | 19 | # now define the layout for the appender 20 | log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout 21 | log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x -%m%n 22 | 23 | # now map our console appender as a root logger, means all log messages will go 24 | # to this appender 25 | log4j.rootLogger = INFO, consoleAppender 26 | -------------------------------------------------------------------------------- /YCSB/hbase094/README.md: -------------------------------------------------------------------------------- 1 | 17 | 18 | # HBase (0.94.x) Driver for YCSB 19 | This driver is a binding for the YCSB facilities to operate against a HBase 0.94.x Server cluster. It may also work against 0.92.x 20 | To run against an HBase 0.98.x cluster, use the `hbase098` binding. 21 | To run against an HBase >= 1.0 cluster, use the `hbase10` binding. 22 | 23 | See `hbase098/README.md` for configuration details. 24 | -------------------------------------------------------------------------------- /YCSB/hbase098/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent/ 26 | 27 | 28 | hbase098-binding 29 | HBase 0.98.x DB Binding 30 | 31 | 32 | 33 | org.apache.hbase 34 | hbase-client 35 | ${hbase098.version} 36 | 37 | 38 | com.yahoo.ycsb 39 | core 40 | ${project.version} 41 | provided 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /YCSB/hbase098/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. See accompanying LICENSE file. 15 | */ 16 | 17 | /** 18 | * The YCSB binding for HBase 20 | * 0.98.X. The classes in this package are also used for the HBase 0.94.X 21 | * but with different dependencies via the hbase094 binding. 22 | */ 23 | package com.yahoo.ycsb.db; 24 | -------------------------------------------------------------------------------- /YCSB/hbase10/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for HBase 20 | * using the HBase 1.0.0 API. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | 24 | -------------------------------------------------------------------------------- /YCSB/hbase10/src/test/resources/hbase-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | hbase.master.info.port 22 | -1 23 | The port for the hbase master web UI 24 | Set to -1 if you do not want the info server to run. 25 | 26 | 27 | 28 | hbase.regionserver.info.port 29 | -1 30 | The port for the hbase regionserver web UI 31 | Set to -1 if you do not want the info server to run. 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /YCSB/hbase10/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you 5 | # may not use this file except in compliance with the License. You 6 | # may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. See the License for the specific language governing 14 | # permissions and limitations under the License. See accompanying 15 | # LICENSE file. 16 | # 17 | 18 | # Root logger option 19 | log4j.rootLogger=WARN, stderr 20 | 21 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 22 | log4j.appender.stderr.target=System.err 23 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n 25 | 26 | # Suppress messages from ZKTableStateManager: Creates a large number of table 27 | # state change messages. 28 | log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKTableStateManager=ERROR 29 | -------------------------------------------------------------------------------- /YCSB/hypertable/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Hypertable. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/infinispan/src/main/conf/infinispan-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /YCSB/infinispan/src/main/conf/remote-cache.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | infinispan.client.hotrod.server_list=192.168.101.17:11222 17 | infinispan.client.hotrod.force_return_values=false 18 | 19 | maxActive=-1 20 | maxIdle=-1 21 | minIdle=1 22 | maxTotal=-1 23 | 24 | whenExhaustedAction=1 25 | -------------------------------------------------------------------------------- /YCSB/infinispan/src/main/java/com/yahoo/ycsb/db/RemoteCacheManagerHolder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.db; 19 | 20 | import java.util.Properties; 21 | 22 | import org.infinispan.client.hotrod.RemoteCacheManager; 23 | 24 | /** 25 | * Utility class to ensure only a single RemoteCacheManager is created. 26 | */ 27 | final class RemoteCacheManagerHolder { 28 | 29 | private static volatile RemoteCacheManager cacheManager = null; 30 | 31 | private RemoteCacheManagerHolder() { 32 | } 33 | 34 | static RemoteCacheManager getInstance(Properties props) { 35 | RemoteCacheManager result = cacheManager; 36 | if (result == null) { 37 | synchronized (RemoteCacheManagerHolder.class) { 38 | result = cacheManager; 39 | if (result == null) { 40 | result = new RemoteCacheManager(props); 41 | cacheManager = new RemoteCacheManager(props); 42 | } 43 | } 44 | } 45 | return result; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /YCSB/infinispan/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2016 YCSB Contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Infinispan. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/conf/db.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # Properties file that contains database connection information. 17 | 18 | db.driver=org.h2.Driver 19 | # jdbc.fetchsize=20 20 | db.url=jdbc:h2:tcp://foo.com:9092/~/h2/ycsb 21 | db.user=sa 22 | db.passwd= 23 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/conf/h2.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # Properties file that contains database connection information. 17 | 18 | db.driver=org.h2.Driver 19 | db.url=jdbc:h2:tcp://foo.com:9092/~/h2/ycsb 20 | db.user=sa 21 | db.passwd= 22 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/java/com/yahoo/ycsb/db/flavors/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | /** 18 | * This package contains a collection of database-specific overrides. This accounts for the variance 19 | * that can be present where JDBC does not explicitly define what a database must do or when a 20 | * database has a non-standard SQL implementation. 21 | */ 22 | package com.yahoo.ycsb.db.flavors; 23 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 - 2016, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for stores that can be accessed via JDBC. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/resources/sql/README.md: -------------------------------------------------------------------------------- 1 | 18 | Contains all the SQL statements used by the JDBC client. 19 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/resources/sql/create_table.mysql: -------------------------------------------------------------------------------- 1 | -- Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | -- 3 | -- Licensed under the Apache License, Version 2.0 (the "License"); you 4 | -- may not use this file except in compliance with the License. You 5 | -- may obtain a copy of the License at 6 | -- 7 | -- http://www.apache.org/licenses/LICENSE-2.0 8 | -- 9 | -- Unless required by applicable law or agreed to in writing, software 10 | -- distributed under the License is distributed on an "AS IS" BASIS, 11 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | -- implied. See the License for the specific language governing 13 | -- permissions and limitations under the License. See accompanying 14 | -- LICENSE file. 15 | 16 | -- Creates a Table. 17 | 18 | -- Drop the table if it exists; 19 | DROP TABLE IF EXISTS usertable; 20 | 21 | -- Create the user table with 5 fields. 22 | CREATE TABLE usertable(YCSB_KEY VARCHAR (255) PRIMARY KEY, 23 | FIELD0 TEXT, FIELD1 TEXT, 24 | FIELD2 TEXT, FIELD3 TEXT, 25 | FIELD4 TEXT, FIELD5 TEXT, 26 | FIELD6 TEXT, FIELD7 TEXT, 27 | FIELD8 TEXT, FIELD9 TEXT); 28 | -------------------------------------------------------------------------------- /YCSB/jdbc/src/main/resources/sql/create_table.sql: -------------------------------------------------------------------------------- 1 | -- Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | -- 3 | -- Licensed under the Apache License, Version 2.0 (the "License"); you 4 | -- may not use this file except in compliance with the License. You 5 | -- may obtain a copy of the License at 6 | -- 7 | -- http://www.apache.org/licenses/LICENSE-2.0 8 | -- 9 | -- Unless required by applicable law or agreed to in writing, software 10 | -- distributed under the License is distributed on an "AS IS" BASIS, 11 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | -- implied. See the License for the specific language governing 13 | -- permissions and limitations under the License. See accompanying 14 | -- LICENSE file. 15 | 16 | -- Creates a Table. 17 | 18 | -- Drop the table if it exists; 19 | DROP TABLE IF EXISTS usertable; 20 | 21 | -- Create the user table with 5 fields. 22 | CREATE TABLE usertable(YCSB_KEY VARCHAR PRIMARY KEY, 23 | FIELD0 VARCHAR, FIELD1 VARCHAR, 24 | FIELD2 VARCHAR, FIELD3 VARCHAR, 25 | FIELD4 VARCHAR, FIELD5 VARCHAR, 26 | FIELD6 VARCHAR, FIELD7 VARCHAR, 27 | FIELD8 VARCHAR, FIELD9 VARCHAR); 28 | -------------------------------------------------------------------------------- /YCSB/kudu/src/main/conf/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you 5 | # may not use this file except in compliance with the License. You 6 | # may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | # implied. See the License for the specific language governing 14 | # permissions and limitations under the License. See accompanying 15 | # LICENSE file. 16 | # 17 | # Enables getting logs from the client. 18 | 19 | log4j.rootLogger = INFO, out 20 | log4j.appender.out = org.apache.log4j.ConsoleAppender 21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout 22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n 23 | 24 | log4j.logger.kudu = INFO 25 | -------------------------------------------------------------------------------- /YCSB/kudu/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Apache Kudu. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/kudu/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Root logger option 2 | log4j.rootLogger=DEBUG, stderr 3 | 4 | log4j.logger.com.stumbleupon.async=WARN 5 | log4j.logger.org.apache.kudu=WARN 6 | 7 | # Direct log messages to stderr 8 | log4j.appender.stderr = org.apache.log4j.ConsoleAppender 9 | log4j.appender.stderr.Target=System.err 10 | log4j.appender.stderr.layout = org.apache.log4j.PatternLayout 11 | log4j.appender.stderr.layout.ConversionPattern = [%p] %d{HH:mm:ss.SSS} (%F:%L) %m%n 12 | -------------------------------------------------------------------------------- /YCSB/kvtracer/README.md: -------------------------------------------------------------------------------- 1 | # kvtracer 2 | 3 | Dummy YCSB client to record all the workload operations in a trace file, and convert 4 | them to simple key-value GET/PUT operation to be used by some other benchmark tools. 5 | 6 | ## Usage 7 | To compile the kvtracer module , 8 | * Put the `kvtracer` directory in `YCSB` source directory 9 | * Modify the `pom.xml` file in the root directory of `YCSB` to include `kvtracer` 10 | (refer to https://github.com/stormspirit/YCSB), e.g., 11 | 12 | ``` 13 | 14 | ... 15 | 2.0.0 16 | + 0.1.0 17 | ... 18 | 19 | 20 | ... 21 | redis 22 | + kvtracer 23 | ... 24 | 25 | ``` 26 | * Compile with `mvn -pl kvtracer -am clean package`. The jar file should be generated in 27 | the `target` directory in `kvtracer`. 28 | 29 | To generate the workload trace, run 30 | ``` 31 | bin/ycsb load kvtracer -P workloads/workloada -p "kvtracer.tracefile=tracea_load.txt" -p "kvtracer.keymapfile=tracea_keys.txt" 32 | ``` 33 | and 34 | ``` 35 | bin/ycsb run kvtracer -P workloads/workloada -p "kvtracer.tracefile=tracea_run.txt" -p "kvtracer.keymapfile=tracea_keys.txt" 36 | ``` 37 | Replace the `kvtracer.tracefile` and `kvtracer.keymapfile` configuration if needed. 38 | The keymap file is needed because the YCSB operations are richer than simple key-value 39 | GET/PUT, e.g., delete table with a name will delete all keys/fields for that table. 40 | We need to know what exactly are these keys. 41 | 42 | The final traces are in `tracea_load.txt` (for loading data) and `tracea_run.txt` 43 | (for operations). You can merge them into one trace. 44 | 45 | -------------------------------------------------------------------------------- /YCSB/kvtracer/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.yahoo.ycsb 6 | binding-parent 7 | 0.13.0-SNAPSHOT 8 | ../binding-parent 9 | 10 | 11 | kvtracer-binding 12 | Binging to generate key-value workload traces 13 | jar 14 | 15 | 16 | 17 | com.yahoo.ycsb 18 | core 19 | ${project.version} 20 | provided 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /YCSB/mapkeeper/README.md: -------------------------------------------------------------------------------- 1 | # MapKeeper-Specific Properties 2 | 3 | ## mapkeeper.host 4 | 5 | Specifies the host MapKeeper server is running on (default: localhost). 6 | 7 | ## mapkeeper.port 8 | 9 | Specifies the port MapKeeper server is listening to (default: 9090). 10 | -------------------------------------------------------------------------------- /YCSB/memcached/conf/memcached.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # 17 | # Sample property file for Memcached Client 18 | 19 | ## Mandatory parameters 20 | 21 | # A comma-separated list of memcached server endpoints, each being an IP or 22 | # hostname with an optional port; the port defaults to the memcached-standard 23 | # port of 11211 if not specified. 24 | # 25 | # memcached.hosts = 26 | 27 | ## Optional parameters 28 | 29 | # Shutdown timeout in milliseconds. 30 | # 31 | # memcached.shutdownTimeoutMillis = 30000 32 | 33 | # Object expiration time for memcached; defaults to `Integer.MAX_VALUE`. 34 | # 35 | # memcached.objectExpirationTime = 2147483647 36 | 37 | # Whether to verify the success of each operation; defaults to true. 38 | # 39 | # memcached.checkOperationStatus = true 40 | 41 | # Read buffer size, in bytes. 42 | # 43 | # memcached.readBufferSize = 3000000 44 | 45 | # Operation timeout, in milliseconds. 46 | # 47 | # memcached.opTimeoutMillis = 60000 48 | 49 | # What to do with failures; this is one of `net.spy.memcached.FailureMode` enum 50 | # values, which are currently: `Redistribute`, `Retry`, or `Cancel`. 51 | # 52 | # memcached.failureMode = Redistribute 53 | -------------------------------------------------------------------------------- /YCSB/memcached/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for memcached. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | -------------------------------------------------------------------------------- /YCSB/mongodb/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for MongoDB. 20 | * For additional details on using and configuring the binding see the 21 | * accompanying README.md. 24 | *

25 | * A YCSB binding is provided for both the the 26 | * Asynchronous 27 | * Java Driver and the MongoDB Inc. 28 | * driver. 29 | *

30 | */ 31 | package com.yahoo.ycsb.db; 32 | 33 | -------------------------------------------------------------------------------- /YCSB/mongodb/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2016 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | #define the console appender 17 | log4j.appender.consoleAppender = org.apache.log4j.ConsoleAppender 18 | 19 | # now define the layout for the appender 20 | log4j.appender.consoleAppender.layout = org.apache.log4j.PatternLayout 21 | log4j.appender.consoleAppender.layout.ConversionPattern=%-4r [%t] %-5p %c %x -%m%n 22 | 23 | # now map our console appender as a root logger, means all log messages will go 24 | # to this appender 25 | log4j.rootLogger = INFO, consoleAppender 26 | -------------------------------------------------------------------------------- /YCSB/mongodb/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /YCSB/mongodb/src/test/java/com/yahoo/ycsb/db/AsyncMongoDbClientTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.db; 18 | 19 | import com.yahoo.ycsb.DB; 20 | 21 | /** 22 | * AsyncMongoDbClientTest provides runs the basic workload operations. 23 | */ 24 | public class AsyncMongoDbClientTest extends MongoDbClientTest { 25 | 26 | @Override 27 | protected DB instantiateClient() { 28 | return new AsyncMongoDbClient(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /YCSB/nosqldb/README.md: -------------------------------------------------------------------------------- 1 | CONFIGURE 2 | 3 | $KVHOME is Oracle NoSQL Database package files. 4 | $KVROOT is a data directory. 5 | $YCSBHOME is a YCSB home directory. 6 | 7 | mkdir $KVROOT 8 | java -jar $KVHOME/lib/kvstore-1.2.123.jar makebootconfig \ 9 | -root $KVROOT -port 5000 -admin 5001 -host localhost \ 10 | -harange 5010,5020 11 | java -jar $KVHOME/lib/kvstore-1.2.123.jar start -root $KVROOT 12 | java -jar $KVHOME/lib/kvstore-1.2.123.jar runadmin \ 13 | -port 5000 -host localhost -script $YCSBHOME/conf/script.txt 14 | 15 | BENCHMARK 16 | 17 | $YCSBHOME/bin/ycsb load nosqldb -P workloads/workloada 18 | $YCSBHOME/bin/ycsb run nosqldb -P workloads/workloada 19 | 20 | PROPERTIES 21 | 22 | See $YCSBHOME/conf/nosqldb.properties. 23 | 24 | STOP 25 | 26 | $ java -jar $KVHOME/lib/kvstore-1.2.123.jar stop -root $KVROOT 27 | 28 | 29 | Please refer to Oracle NoSQL Database docs here: 30 | http://docs.oracle.com/cd/NOSQL/html/index.html 31 | -------------------------------------------------------------------------------- /YCSB/nosqldb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent 26 | 27 | 28 | nosqldb-binding 29 | Oracle NoSQL Database Binding 30 | jar 31 | 32 | 33 | 34 | com.oracle.kv 35 | oracle-nosql-client 36 | 3.0.5 37 | 38 | 39 | com.yahoo.ycsb 40 | core 41 | ${project.version} 42 | provided 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /YCSB/nosqldb/src/main/conf/nosqldb.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # 17 | # Sample property file for Oracle NoSQL Database client 18 | # 19 | # Refer to the Javadoc of oracle.kv.KVStoreConfig class 20 | # for more details. 21 | # 22 | 23 | # Store name 24 | #storeName=kvstore 25 | 26 | # Comma-separated list of helper host/port pairs 27 | #helperHost=localhost:5000 28 | 29 | # Read consistency 30 | # "ABSOLUTE" or "NONE_REQUIRED" 31 | #consistency=NONE_REQUIRED 32 | 33 | # Write durability 34 | # "COMMIT_NO_SYNC", "COMMIT_SYNC" or "COMMIT_WRITE_NO_SYNC" 35 | #durability=COMMIT_NO_SYNC 36 | 37 | # Limitations on the number of active requests to a node 38 | #requestLimit.maxActiveRequests=100 39 | #requestLimit.requestThresholdPercent=90 40 | #requestLimit.nodeLimitPercent=80 41 | 42 | # Request timeout in seconds (positive integer) 43 | #requestTimeout=5 44 | -------------------------------------------------------------------------------- /YCSB/nosqldb/src/main/conf/script.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # Simple configuration file; only one node in a system 17 | configure kvstore 18 | plan -execute -name "Deploy DC" deploy-datacenter "Local" 19 | plan -execute -name "Deploy n01" deploy-sn 1 localhost 5000 20 | plan -execute -name "Deploy admin" deploy-admin 1 5001 21 | addpool LocalPool 22 | joinpool LocalPool 1 23 | plan -execute -name "Deploy the store" deploy-store LocalPool 1 100 24 | quit 25 | -------------------------------------------------------------------------------- /YCSB/nosqldb/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. See accompanying LICENSE file. 15 | */ 16 | 17 | /** 18 | * The YCSB binding for Oracle 20 | * 's NoSQL DB. 21 | */ 22 | package com.yahoo.ycsb.db; 23 | -------------------------------------------------------------------------------- /YCSB/orientdb/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 - 2016, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for OrientDB. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/orientdb/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Root logger option 2 | log4j.rootLogger=INFO, stderr 3 | 4 | # Direct log messages to stderr 5 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 6 | log4j.appender.stderr.Target=System.err 7 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n 9 | -------------------------------------------------------------------------------- /YCSB/rados/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for RADOS of Ceph. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | -------------------------------------------------------------------------------- /YCSB/redis/README.md: -------------------------------------------------------------------------------- 1 | 17 | 18 | ## Quick Start 19 | 20 | This section describes how to run YCSB on Redis. 21 | 22 | ### 1. Start Redis 23 | 24 | ### 2. Install Java and Maven 25 | 26 | ### 3. Set Up YCSB 27 | 28 | Git clone YCSB and compile: 29 | 30 | git clone http://github.com/brianfrankcooper/YCSB.git 31 | cd YCSB 32 | mvn -pl com.yahoo.ycsb:redis-binding -am clean package 33 | 34 | ### 4. Provide Redis Connection Parameters 35 | 36 | Set the host, port, and password (do not redis auth is not turned on) in the 37 | workload you plan to run. 38 | 39 | - `redis.host` 40 | - `redis.port` 41 | - `redis.password` 42 | 43 | Or, you can set configs with the shell command, EG: 44 | 45 | ./bin/ycsb load redis -s -P workloads/workloada -p "redis.host=127.0.0.1" -p "redis.port=6379" > outputLoad.txt 46 | 47 | ### 5. Load data and run tests 48 | 49 | Load the data: 50 | 51 | ./bin/ycsb load redis -s -P workloads/workloada > outputLoad.txt 52 | 53 | Run the workload test: 54 | 55 | ./bin/ycsb run redis -s -P workloads/workloada > outputRun.txt 56 | 57 | -------------------------------------------------------------------------------- /YCSB/redis/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4.0.0 21 | 22 | com.yahoo.ycsb 23 | binding-parent 24 | 0.13.0-SNAPSHOT 25 | ../binding-parent 26 | 27 | 28 | redis-binding 29 | Redis DB Binding 30 | jar 31 | 32 | 33 | 34 | redis.clients 35 | jedis 36 | ${redis.version} 37 | 38 | 39 | com.yahoo.ycsb 40 | core 41 | ${project.version} 42 | provided 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /YCSB/redis/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for Redis. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/rest/src/main/java/com/yahoo/ycsb/webservice/rest/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for RESTFul Web Services. 20 | */ 21 | package com.yahoo.ycsb.webservice.rest; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/rest/src/test/java/com/yahoo/ycsb/webservice/rest/ResourceLoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | package com.yahoo.ycsb.webservice.rest; 19 | 20 | import java.util.HashSet; 21 | import java.util.Set; 22 | 23 | import javax.ws.rs.core.Application; 24 | 25 | /** 26 | * Class responsible for loading mock rest resource class like 27 | * {@link RestTestResource}. 28 | */ 29 | public class ResourceLoader extends Application { 30 | 31 | @Override 32 | public Set> getClasses() { 33 | final Set> classes = new HashSet>(); 34 | classes.add(RestTestResource.class); 35 | return classes; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /YCSB/rest/src/test/resources/WebContent/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | rest-binding 7 | 8 | 9 | 10 | Welcome to the rest-binding integration test cases! 11 | 12 | 13 | -------------------------------------------------------------------------------- /YCSB/rest/src/test/resources/error_trace.txt: -------------------------------------------------------------------------------- 1 | resource_invalid -------------------------------------------------------------------------------- /YCSB/rest/src/test/resources/trace.txt: -------------------------------------------------------------------------------- 1 | resource_1 2 | resource_2 3 | resource_3 4 | resource_4 5 | resource_5 -------------------------------------------------------------------------------- /YCSB/riak/src/main/java/com/yahoo/ycsb/db/riak/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors All rights reserved. 3 | * Copyright 2014 Basho Technologies, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you 6 | * may not use this file except in compliance with the License. You 7 | * may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 14 | * implied. See the License for the specific language governing 15 | * permissions and limitations under the License. See accompanying 16 | * LICENSE file. 17 | */ 18 | 19 | /** 20 | * The YCSB binding for Riak KV 2.x.y. 21 | * 22 | */ 23 | package com.yahoo.ycsb.db.riak; -------------------------------------------------------------------------------- /YCSB/s3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 4.0.0 19 | 20 | com.yahoo.ycsb 21 | binding-parent 22 | 0.13.0-SNAPSHOT 23 | ../binding-parent 24 | 25 | 26 | s3-binding 27 | S3 Storage Binding 28 | jar 29 | 30 | 31 | 32 | com.amazonaws 33 | aws-java-sdk-s3 34 | ${s3.version} 35 | 36 | 37 | 38 | com.yahoo.ycsb 39 | core 40 | ${project.version} 41 | provided 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /YCSB/s3/src/main/conf/s3.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Sample S3 configuration properties 3 | # 4 | # You may either set properties here or via the command line. 5 | # 6 | 7 | # the AWS S3 access key ID 8 | s3.accessKeyId=yourKey 9 | 10 | # the AWS S3 secret access key ID 11 | s3.secretKey=YourSecret 12 | 13 | # the AWS endpoint 14 | s3.endpoint=s3.amazonaws.com 15 | 16 | # activating the SSE server side encryption if true 17 | s3.sse=false 18 | 19 | # activating the SSE-C client side encryption if used 20 | #s3.ssec=U2CccCI40he2mZtg2aCEzofP7nQsfy4nP14VSYu6bFA= 21 | 22 | # set the protocol to use for the Client, default is HTTPS 23 | #s3.protocol=HTTPS 24 | 25 | # set the maxConnections to use for the Client, it should be not less than the 26 | # threads since only one client is created and shared between threads 27 | #s3.maxConnections= 28 | 29 | # set the maxErrorRetry parameter to use for the Client 30 | #s3.maxErrorRetry= 31 | 32 | -------------------------------------------------------------------------------- /YCSB/s3/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | * 17 | * S3 storage client binding for YCSB. 18 | */ 19 | 20 | package com.yahoo.ycsb.db; 21 | 22 | -------------------------------------------------------------------------------- /YCSB/solr/src/main/java/com/yahoo/ycsb/db/solr/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for 20 | * Solr. 21 | */ 22 | package com.yahoo.ycsb.db.solr; 23 | 24 | -------------------------------------------------------------------------------- /YCSB/solr/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Root logger option 2 | log4j.rootLogger=INFO, stderr 3 | 4 | # Direct log messages to stderr 5 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 6 | log4j.appender.stderr.Target=System.err 7 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n 9 | -------------------------------------------------------------------------------- /YCSB/solr/src/test/java/com/yahoo/ycsb/db/solr/SolrClientCloudTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.db.solr; 18 | 19 | import com.yahoo.ycsb.DB; 20 | import org.junit.After; 21 | 22 | import java.util.Properties; 23 | 24 | import static org.junit.Assume.assumeNoException; 25 | 26 | public class SolrClientCloudTest extends SolrClientBaseTest { 27 | 28 | private SolrClient instance; 29 | 30 | @After 31 | public void tearDown() throws Exception { 32 | try { 33 | if(instance != null) { 34 | instance.cleanup(); 35 | } 36 | } finally { 37 | super.tearDown(); 38 | } 39 | } 40 | 41 | @Override 42 | protected DB getDB(Properties props) { 43 | instance = new SolrClient(); 44 | 45 | props.setProperty("solr.cloud", "true"); 46 | props.setProperty("solr.zookeeper.hosts", miniSolrCloudCluster.getSolrClient().getZkHost()); 47 | 48 | instance.setProperties(props); 49 | try { 50 | instance.init(); 51 | } catch (Exception error) { 52 | assumeNoException(error); 53 | } 54 | return instance; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /YCSB/solr/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2016 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | # 16 | 17 | # Root logger option 18 | log4j.rootLogger=INFO, stderr 19 | 20 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 21 | log4j.appender.stderr.target=System.err 22 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 23 | log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n 24 | 25 | # Suppress messages from ZooKeeper 26 | log4j.logger.org.apache.zookeeper=ERROR 27 | # Solr classes are too chatty in test at INFO 28 | log4j.logger.org.apache.solr=ERROR 29 | log4j.logger.org.eclipse.jetty=ERROR 30 | -------------------------------------------------------------------------------- /YCSB/solr6/src/main/java/com/yahoo/ycsb/db/solr6/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * The YCSB binding for 20 | * Solr. 21 | */ 22 | package com.yahoo.ycsb.db.solr6; 23 | 24 | -------------------------------------------------------------------------------- /YCSB/solr6/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Root logger option 2 | log4j.rootLogger=INFO, stderr 3 | 4 | # Direct log messages to stderr 5 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 6 | log4j.appender.stderr.Target=System.err 7 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 8 | log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n 9 | -------------------------------------------------------------------------------- /YCSB/solr6/src/test/java/com/yahoo/ycsb/db/solr6/SolrClientCloudTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016 YCSB contributors. All rights reserved. 3 | *

4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | *

8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | *

10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | package com.yahoo.ycsb.db.solr6; 18 | 19 | import com.yahoo.ycsb.DB; 20 | import org.junit.After; 21 | 22 | import java.util.Properties; 23 | 24 | import static org.junit.Assume.assumeNoException; 25 | 26 | public class SolrClientCloudTest extends SolrClientBaseTest { 27 | 28 | private SolrClient instance; 29 | 30 | @After 31 | public void tearDown() throws Exception { 32 | try { 33 | if(instance != null) { 34 | instance.cleanup(); 35 | } 36 | } finally { 37 | super.tearDown(); 38 | } 39 | } 40 | 41 | @Override 42 | protected DB getDB(Properties props) { 43 | instance = new SolrClient(); 44 | 45 | props.setProperty("solr.cloud", "true"); 46 | props.setProperty("solr.zookeeper.hosts", miniSolrCloudCluster.getSolrClient().getZkHost()); 47 | 48 | instance.setProperties(props); 49 | try { 50 | instance.init(); 51 | } catch (Exception error) { 52 | assumeNoException(error); 53 | } 54 | return instance; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /YCSB/solr6/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015-2016 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | # 16 | 17 | # Root logger option 18 | log4j.rootLogger=INFO, stderr 19 | 20 | log4j.appender.stderr=org.apache.log4j.ConsoleAppender 21 | log4j.appender.stderr.target=System.err 22 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout 23 | log4j.appender.stderr.layout.conversionPattern=%d{yyyy/MM/dd HH:mm:ss} %-5p %c %x - %m%n 24 | 25 | # Suppress messages from ZooKeeper 26 | log4j.logger.org.apache.zookeeper=ERROR 27 | # Solr classes are too chatty in test at INFO 28 | log4j.logger.org.apache.solr=ERROR 29 | log4j.logger.org.eclipse.jetty=ERROR 30 | -------------------------------------------------------------------------------- /YCSB/tarantool/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 4.0.0 23 | 24 | com.yahoo.ycsb 25 | binding-parent 26 | 0.13.0-SNAPSHOT 27 | ../binding-parent/ 28 | 29 | 30 | tarantool-binding 31 | Tarantool DB Binding 32 | jar 33 | 34 | 35 | 36 | org.tarantool 37 | connector 38 | ${tarantool.version} 39 | 40 | 41 | com.yahoo.ycsb 42 | core 43 | ${project.version} 44 | provided 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /YCSB/tarantool/src/main/conf/tarantool-hash.lua: -------------------------------------------------------------------------------- 1 | -- Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | -- 3 | -- Licensed under the Apache License, Version 2.0 (the "License"); you 4 | -- may not use this file except in compliance with the License. You 5 | -- may obtain a copy of the License at 6 | -- 7 | -- http://www.apache.org/licenses/LICENSE-2.0 8 | -- 9 | -- Unless required by applicable law or agreed to in writing, software 10 | -- distributed under the License is distributed on an "AS IS" BASIS, 11 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | -- implied. See the License for the specific language governing 13 | -- permissions and limitations under the License. See accompanying 14 | -- LICENSE file. 15 | 16 | box.cfg { 17 | listen=3303, 18 | logger="tarantool.log", 19 | log_level=5, 20 | logger_nonblock=true, 21 | wal_mode="none", 22 | pid_file="tarantool.pid" 23 | } 24 | 25 | box.schema.space.create("ycsb", {id = 1024}) 26 | box.space.ycsb:create_index('primary', {type = 'hash', parts = {1, 'STR'}}) 27 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 28 | -------------------------------------------------------------------------------- /YCSB/tarantool/src/main/conf/tarantool-tree.lua: -------------------------------------------------------------------------------- 1 | -- Copyright (c) 2015 YCSB contributors. All rights reserved. 2 | -- 3 | -- Licensed under the Apache License, Version 2.0 (the "License"); you 4 | -- may not use this file except in compliance with the License. You 5 | -- may obtain a copy of the License at 6 | -- 7 | -- http://www.apache.org/licenses/LICENSE-2.0 8 | -- 9 | -- Unless required by applicable law or agreed to in writing, software 10 | -- distributed under the License is distributed on an "AS IS" BASIS, 11 | -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | -- implied. See the License for the specific language governing 13 | -- permissions and limitations under the License. See accompanying 14 | -- LICENSE file. 15 | 16 | box.cfg { 17 | listen=3303, 18 | logger="tarantool.log", 19 | log_level=5, 20 | logger_nonblock=true, 21 | wal_mode="none", 22 | pid_file="tarantool.pid" 23 | } 24 | 25 | box.schema.space.create("ycsb", {id = 1024}) 26 | box.space.ycsb:create_index('primary', {type = 'tree', parts = {1, 'STR'}}) 27 | box.schema.user.grant('guest', 'read,write,execute', 'universe') 28 | -------------------------------------------------------------------------------- /YCSB/tarantool/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 - 2016 YCSB Contributors. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you 5 | * may not use this file except in compliance with the License. You 6 | * may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 13 | * implied. See the License for the specific language governing 14 | * permissions and limitations under the License. See accompanying 15 | * LICENSE file. 16 | */ 17 | 18 | /** 19 | * YCSB binding for Tarantool. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | 23 | -------------------------------------------------------------------------------- /YCSB/trace_gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## usage 4 | ## bash trace_gen.sh [workload_name] <-- a,b,c ... 5 | 6 | for j in {a,b,c,d,f,g,h,i} 7 | do 8 | bin/ycsb load kvtracer -P workloads/workload$j -p "kvtracer.tracefile=tracea_load_$j.txt" -p "kvtracer.keymapfile=tracea_keys_$j.txt" 9 | bin/ycsb run kvtracer -P workloads/workload$j -p "kvtracer.tracefile=tracea_run_$j.txt" -p "kvtracer.keymapfile=tracea_keys_$j.txt" 10 | done 11 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/conf/cluster.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | mycluster 20 | 21 | 0 22 | localhost 23 | 8081 24 | 6666 25 | 0, 1 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/conf/server.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # The ID of *this* particular cluster node 17 | node.id=0 18 | 19 | max.threads=100 20 | 21 | ############### DB options ###################### 22 | 23 | http.enable=true 24 | socket.enable=true 25 | 26 | # BDB 27 | bdb.write.transactions=false 28 | bdb.flush.transactions=false 29 | bdb.cache.size=1G 30 | 31 | # Mysql 32 | mysql.host=localhost 33 | mysql.port=1521 34 | mysql.user=root 35 | mysql.password=3306 36 | mysql.database=test 37 | 38 | #NIO connector settings. 39 | enable.nio.connector=true 40 | 41 | storage.configs=voldemort.store.bdb.BdbStorageConfiguration, voldemort.store.readonly.ReadOnlyStorageConfiguration 42 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/conf/stores.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | usertable 21 | bdb 22 | client 23 | 1 24 | 1 25 | 1 26 | 27 | string 28 | 29 | 30 | java-serialization 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/java/com/yahoo/ycsb/db/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Yahoo!, Inc. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. See accompanying LICENSE file. 15 | */ 16 | 17 | /** 18 | * The YCSB binding for 19 | * Voldemort. 20 | */ 21 | package com.yahoo.ycsb.db; 22 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/resources/config/cluster.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | mycluster 20 | 21 | 0 22 | localhost 23 | 8081 24 | 6666 25 | 0, 1 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/resources/config/server.properties: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 YCSB contributors. All rights reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you 4 | # may not use this file except in compliance with the License. You 5 | # may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 | # implied. See the License for the specific language governing 13 | # permissions and limitations under the License. See accompanying 14 | # LICENSE file. 15 | 16 | # The ID of *this* particular cluster node 17 | node.id=0 18 | 19 | max.threads=100 20 | 21 | ############### DB options ###################### 22 | 23 | http.enable=true 24 | socket.enable=true 25 | 26 | # BDB 27 | bdb.write.transactions=false 28 | bdb.flush.transactions=false 29 | bdb.cache.size=1G 30 | 31 | # Mysql 32 | mysql.host=localhost 33 | mysql.port=1521 34 | mysql.user=root 35 | mysql.password=3306 36 | mysql.database=test 37 | 38 | #NIO connector settings. 39 | enable.nio.connector=true 40 | 41 | storage.configs=voldemort.store.bdb.BdbStorageConfiguration, voldemort.store.readonly.ReadOnlyStorageConfiguration 42 | -------------------------------------------------------------------------------- /YCSB/voldemort/src/main/resources/config/stores.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | usertable 21 | bdb 22 | client 23 | 1 24 | 1 25 | 1 26 | 27 | string 28 | 29 | 30 | java-serialization 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | mydb_client 2 | benchmark 3 | populate 4 | workloads/ 5 | workloads/ 6 | -------------------------------------------------------------------------------- /client/Makefile: -------------------------------------------------------------------------------- 1 | 2 | all: load run 3 | 4 | load: client_load.c 5 | gcc -O2 -g -o $@ $^ -lpthread 6 | 7 | run: client_run.c 8 | gcc -O2 -g -o $@ $^ -lpthread 9 | 10 | clean: 11 | rm -rf run load 12 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # ShieldStore client 2 | 3 | Client for ShieldStore 4 | 5 | ## Build 6 | 7 | $ make 8 | 9 | ## Usage 10 | 11 | For load operation on key-value stores, 12 | 13 | $ ./load 14 | 15 | For run operation on key-value stores, 16 | 17 | $ ./run 18 | 19 | 20 | ## Workloads 21 | 22 | In this sample file, it uses 500 Set operation for LOAD, and 500 SET/GET operation for RUN 23 | with key size: 16Bytes, value size: 16Bytes. 24 | 25 | 26 | -------------------------------------------------------------------------------- /libsgx_tcmalloc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cocoppang/ShieldStore/5de0122c1281730271649c7bd0980d496903698b/libsgx_tcmalloc.a -------------------------------------------------------------------------------- /make_script.sh: -------------------------------------------------------------------------------- 1 | make clean 2 | make SGX_MODE=HW SGX_PRERELEASE=1 3 | #./app 4 | --------------------------------------------------------------------------------