Full Code of alibaba/proximabilin for AI

master 42a1afe8b35d cached
682 files
29.6 MB
1.4M tokens
4068 symbols
1 requests
Download .txt
Showing preview only (5,693K chars total). Download the full file or copy to clipboard to get everything.
Repository: alibaba/proximabilin
Branch: master
Commit: 42a1afe8b35d
Files: 682
Total size: 29.6 MB

Directory structure:
gitextract_m01w5_is/

├── .clang-format
├── .git/
│   ├── HEAD
│   ├── config
│   ├── description
│   ├── hooks/
│   │   ├── applypatch-msg.sample
│   │   ├── commit-msg.sample
│   │   ├── fsmonitor-watchman.sample
│   │   ├── post-update.sample
│   │   ├── pre-applypatch.sample
│   │   ├── pre-commit.sample
│   │   ├── pre-merge-commit.sample
│   │   ├── pre-push.sample
│   │   ├── pre-rebase.sample
│   │   ├── pre-receive.sample
│   │   ├── prepare-commit-msg.sample
│   │   ├── push-to-checkout.sample
│   │   ├── sendemail-validate.sample
│   │   └── update.sample
│   ├── index
│   ├── info/
│   │   └── exclude
│   ├── logs/
│   │   ├── HEAD
│   │   └── refs/
│   │       ├── heads/
│   │       │   └── master
│   │       └── remotes/
│   │           └── origin/
│   │               └── HEAD
│   ├── objects/
│   │   └── pack/
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.idx
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.pack
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.rev
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.idx
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.pack
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor
│   │       └── pack-9d01884951ce3c844b4ee264b844b04baca4920c.rev
│   ├── packed-refs
│   ├── refs/
│   │   ├── heads/
│   │   │   └── master
│   │   └── remotes/
│   │       └── origin/
│   │           └── HEAD
│   └── shallow
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── Dockerfile
├── LICENSE
├── README.md
├── benchmark/
│   ├── README.md
│   ├── __init__.py
│   ├── common/
│   │   ├── __init__.py
│   │   ├── exceptions.py
│   │   ├── mysql_utils.py
│   │   ├── proxima2_dataset.py
│   │   ├── proxima_be_query.py
│   │   ├── proxima_be_repo.py
│   │   ├── proxima_be_service.py
│   │   └── runner.py
│   ├── requirements.txt
│   ├── scripts/
│   │   ├── build_bench.py
│   │   ├── query_bench.py
│   │   ├── recall.py
│   │   └── vec2txt.py
│   ├── sql/
│   │   └── create_table.sql
│   └── tests/
│       └── service_test.py
├── cmake/
│   ├── README.md
│   ├── bazel.cmake
│   └── option.cmake
├── deps/
│   ├── proxima/
│   │   ├── CMakeLists.txt
│   │   ├── include/
│   │   │   ├── ailego/
│   │   │   │   ├── algorithm/
│   │   │   │   │   └── rate_limiter.h
│   │   │   │   ├── container/
│   │   │   │   │   ├── bitmap.h
│   │   │   │   │   ├── cube.h
│   │   │   │   │   ├── heap.h
│   │   │   │   │   ├── hypercube.h
│   │   │   │   │   ├── vector.h
│   │   │   │   │   └── vector_array.h
│   │   │   │   ├── debug/
│   │   │   │   │   ├── bug_report.h
│   │   │   │   │   ├── symbol_table.h
│   │   │   │   │   ├── user_context.h
│   │   │   │   │   ├── user_context_darwin.h
│   │   │   │   │   └── user_context_linux.h
│   │   │   │   ├── encoding/
│   │   │   │   │   ├── base64.h
│   │   │   │   │   ├── json/
│   │   │   │   │   │   ├── mod_json.h
│   │   │   │   │   │   └── mod_json_plus.h
│   │   │   │   │   ├── json.h
│   │   │   │   │   └── uri.h
│   │   │   │   ├── hash/
│   │   │   │   │   ├── crc32c.h
│   │   │   │   │   ├── fnv1.h
│   │   │   │   │   └── jump_hash.h
│   │   │   │   ├── internal/
│   │   │   │   │   └── platform.h
│   │   │   │   ├── io/
│   │   │   │   │   ├── file.h
│   │   │   │   │   ├── file_lock.h
│   │   │   │   │   ├── file_writer.h
│   │   │   │   │   ├── mmap_file.h
│   │   │   │   │   └── pid_file.h
│   │   │   │   ├── parallel/
│   │   │   │   │   ├── lock.h
│   │   │   │   │   ├── semaphore.h
│   │   │   │   │   ├── thread_pool.h
│   │   │   │   │   └── thread_queue.h
│   │   │   │   ├── pattern/
│   │   │   │   │   ├── closure.h
│   │   │   │   │   ├── defer.h
│   │   │   │   │   ├── factory.h
│   │   │   │   │   ├── scope_guard.h
│   │   │   │   │   └── singleton.h
│   │   │   │   ├── string/
│   │   │   │   │   ├── string_concat_helper.h
│   │   │   │   │   └── string_view.h
│   │   │   │   ├── utility/
│   │   │   │   │   ├── bitset_helper.h
│   │   │   │   │   ├── dl_helper.h
│   │   │   │   │   ├── file_helper.h
│   │   │   │   │   ├── float_helper.h
│   │   │   │   │   ├── process_helper.h
│   │   │   │   │   ├── string_helper.h
│   │   │   │   │   ├── string_helper_impl.h
│   │   │   │   │   ├── time_helper.h
│   │   │   │   │   └── type_helper.h
│   │   │   │   ├── version.h
│   │   │   │   └── version.i
│   │   │   └── aitheta2/
│   │   │       ├── index_closet.h
│   │   │       ├── index_container.h
│   │   │       ├── index_context.h
│   │   │       ├── index_converter.h
│   │   │       ├── index_document.h
│   │   │       ├── index_dumper.h
│   │   │       ├── index_error.h
│   │   │       ├── index_factory.h
│   │   │       ├── index_filter.h
│   │   │       ├── index_format.h
│   │   │       ├── index_framework.h
│   │   │       ├── index_helper.h
│   │   │       ├── index_holder.h
│   │   │       ├── index_logger.h
│   │   │       ├── index_measure.h
│   │   │       ├── index_meta.h
│   │   │       ├── index_module.h
│   │   │       ├── index_packer.h
│   │   │       ├── index_params.h
│   │   │       ├── index_plugin.h
│   │   │       ├── index_provider.h
│   │   │       ├── index_reformer.h
│   │   │       ├── index_searcher.h
│   │   │       ├── index_stats.h
│   │   │       ├── index_storage.h
│   │   │       ├── index_streamer.h
│   │   │       ├── index_threads.h
│   │   │       ├── index_unpacker.h
│   │   │       └── index_version.h
│   │   └── lib/
│   │       ├── Linux.x86_64.broadwell/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.haswell/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.nehalem/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.sandybridge/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.skylake/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.skylake_avx512/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.znver1/
│   │       │   └── libproxima.so.2.5.0
│   │       └── Linux.x86_64.znver2/
│   │           └── libproxima.so.2.5.0
│   └── thirdparty/
│       ├── .gitignore
│       ├── CMakeLists.txt
│       ├── brpc/
│       │   └── CMakeLists.txt
│       ├── gflags/
│       │   └── CMakeLists.txt
│       ├── glog/
│       │   └── CMakeLists.txt
│       ├── googletest/
│       │   └── CMakeLists.txt
│       ├── leveldb/
│       │   └── CMakeLists.txt
│       ├── mysql/
│       │   └── CMakeLists.txt
│       ├── ncurses/
│       │   └── CMakeLists.txt
│       ├── openssl/
│       │   └── CMakeLists.txt
│       ├── patches/
│       │   └── brpc.patch
│       ├── protobuf/
│       │   └── CMakeLists.txt
│       ├── snappy/
│       │   └── CMakeLists.txt
│       ├── sparsehash/
│       │   └── CMakeLists.txt
│       └── sqlite/
│           └── CMakeLists.txt
├── scripts/
│   ├── README.md
│   ├── conf/
│   │   ├── proxima_be.conf
│   │   └── proxima_se.conf
│   ├── gcc4.9-build.sh
│   ├── gcc4.9-unittest.sh
│   ├── gcc8.3-build.sh
│   ├── gcc8.3-integration.sh
│   ├── gcc8.3-unittest.sh
│   ├── gcov.sh
│   ├── hooks/
│   │   ├── clang-format.sh
│   │   ├── common.sh
│   │   ├── post-commit
│   │   └── pre-commit
│   └── install-git-hooks.sh
├── sdk/
│   ├── CMakeLists.txt
│   ├── cpp/
│   │   ├── CMakeLists.txt
│   │   ├── README.txt
│   │   ├── examples/
│   │   │   └── client_example.cc
│   │   ├── include/
│   │   │   └── proxima_search_client.h
│   │   └── src/
│   │       ├── grpc_client.cc
│   │       ├── grpc_client.h
│   │       ├── http_client.cc
│   │       ├── http_client.h
│   │       ├── proxima_search_client.cc
│   │       └── version.h
│   ├── go/
│   │   ├── .gitignore
│   │   ├── README.md
│   │   ├── client_proxy.go
│   │   ├── clients.go
│   │   ├── const.go
│   │   ├── doc.go
│   │   ├── examples/
│   │   │   └── demo/
│   │   │       ├── README.md
│   │   │       ├── example.go
│   │   │       ├── go.mod
│   │   │       └── go.sum
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── interfaces.go
│   │   ├── options.go
│   │   ├── proto/
│   │   │   ├── common.pb.go
│   │   │   ├── config.pb.go
│   │   │   └── proxima_be.pb.go
│   │   ├── status.go
│   │   ├── types.go
│   │   ├── utils.go
│   │   ├── utils_test.go
│   │   └── version.go
│   ├── java/
│   │   ├── README.txt
│   │   ├── example/
│   │   │   ├── pom.xml
│   │   │   └── src/
│   │   │       └── main/
│   │   │           ├── java/
│   │   │           │   └── com/
│   │   │           │       └── alibaba/
│   │   │           │           └── example/
│   │   │           │               ├── BenchClient.java
│   │   │           │               └── TestExample.java
│   │   │           └── resources/
│   │   │               └── log4j2.xml
│   │   ├── pom.xml
│   │   └── src/
│   │       └── main/
│   │           ├── java/
│   │           │   └── com/
│   │           │       └── alibaba/
│   │           │           └── proxima/
│   │           │               └── be/
│   │           │                   └── client/
│   │           │                       ├── CollectionConfig.java
│   │           │                       ├── CollectionInfo.java
│   │           │                       ├── CollectionStats.java
│   │           │                       ├── ConnectParam.java
│   │           │                       ├── DataType.java
│   │           │                       ├── DatabaseRepository.java
│   │           │                       ├── DescribeCollectionResponse.java
│   │           │                       ├── Document.java
│   │           │                       ├── GetDocumentRequest.java
│   │           │                       ├── GetDocumentResponse.java
│   │           │                       ├── GetVersionResponse.java
│   │           │                       ├── IndexColumnParam.java
│   │           │                       ├── IndexType.java
│   │           │                       ├── ListCollectionsResponse.java
│   │           │                       ├── ListCondition.java
│   │           │                       ├── LsnContext.java
│   │           │                       ├── ProtoConverter.java
│   │           │                       ├── ProximaGrpcSearchClient.java
│   │           │                       ├── ProximaSEException.java
│   │           │                       ├── ProximaSearchClient.java
│   │           │                       ├── QueryRequest.java
│   │           │                       ├── QueryResponse.java
│   │           │                       ├── QueryResult.java
│   │           │                       ├── StatsCollectionResponse.java
│   │           │                       ├── Status.java
│   │           │                       └── WriteRequest.java
│   │           ├── proto/
│   │           │   ├── common.proto
│   │           │   └── proxima_be.proto
│   │           └── resources/
│   │               └── proxima-be.properties
│   └── python/
│       ├── docs/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── conf.py
│       │   └── index.rst
│       ├── example/
│       │   ├── example.py
│       │   ├── example_async.py
│       │   └── mysql_example.py
│       ├── pyproximabe/
│       │   ├── __init__.py
│       │   ├── core/
│       │   │   ├── __init__.py
│       │   │   ├── client.py
│       │   │   ├── handlers.py
│       │   │   └── types.py
│       │   └── proto/
│       │       └── __init__.py
│       ├── requirements-dev.txt
│       └── requirements.txt
├── src/
│   ├── CMakeLists.txt
│   ├── admin/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── admin_agent.cc
│   │   ├── admin_agent.h
│   │   ├── admin_proto_converter.cc
│   │   └── admin_proto_converter.h
│   ├── agent/
│   │   ├── CMakeLists.txt
│   │   ├── collection_counter.h
│   │   ├── column_order.cc
│   │   ├── column_order.h
│   │   ├── index_agent.cc
│   │   ├── index_agent.h
│   │   └── write_request.h
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── auto_counter.h
│   │   ├── config.cc
│   │   ├── config.h
│   │   ├── defer.h
│   │   ├── error_code.cc
│   │   ├── error_code.h
│   │   ├── glogger.cc
│   │   ├── interface/
│   │   │   └── service.h
│   │   ├── logger.h
│   │   ├── macro_define.h
│   │   ├── profiler.h
│   │   ├── protobuf_helper.cc
│   │   ├── protobuf_helper.h
│   │   ├── sys_logger.cc
│   │   ├── transformer.cc
│   │   ├── transformer.h
│   │   ├── types.h
│   │   ├── types_helper.h
│   │   ├── uuid_helper.cc
│   │   ├── uuid_helper.h
│   │   ├── version.cc
│   │   ├── version.h
│   │   ├── wait_notifier.cc
│   │   └── wait_notifier.h
│   ├── index/
│   │   ├── CMakeLists.txt
│   │   ├── collection.cc
│   │   ├── collection.h
│   │   ├── collection_dataset.cc
│   │   ├── collection_dataset.h
│   │   ├── collection_query.h
│   │   ├── collection_stats.h
│   │   ├── column/
│   │   │   ├── column_indexer.cc
│   │   │   ├── column_indexer.h
│   │   │   ├── column_reader.cc
│   │   │   ├── column_reader.h
│   │   │   ├── context_pool.cc
│   │   │   ├── context_pool.h
│   │   │   ├── forward_data.h
│   │   │   ├── forward_indexer.cc
│   │   │   ├── forward_indexer.h
│   │   │   ├── forward_reader.cc
│   │   │   ├── forward_reader.h
│   │   │   ├── index_helper.cc
│   │   │   ├── index_helper.h
│   │   │   ├── index_provider.h
│   │   │   ├── simple_forward_indexer.cc
│   │   │   ├── simple_forward_indexer.h
│   │   │   ├── simple_forward_reader.cc
│   │   │   ├── simple_forward_reader.h
│   │   │   ├── vector_column_indexer.cc
│   │   │   ├── vector_column_indexer.h
│   │   │   ├── vector_column_reader.cc
│   │   │   └── vector_column_reader.h
│   │   ├── concurrent_bitmap.h
│   │   ├── concurrent_hash_map.h
│   │   ├── constants.h
│   │   ├── delete_store.cc
│   │   ├── delete_store.h
│   │   ├── delta_store.h
│   │   ├── file_helper.h
│   │   ├── id_map.cc
│   │   ├── id_map.h
│   │   ├── index_service.cc
│   │   ├── index_service.h
│   │   ├── lsn_store.cc
│   │   ├── lsn_store.h
│   │   ├── persist_hash_map.h
│   │   ├── segment/
│   │   │   ├── memory_segment.cc
│   │   │   ├── memory_segment.h
│   │   │   ├── persist_segment.cc
│   │   │   ├── persist_segment.h
│   │   │   ├── persist_segment_manager.cc
│   │   │   ├── persist_segment_manager.h
│   │   │   └── segment.h
│   │   ├── snapshot.cc
│   │   ├── snapshot.h
│   │   ├── typedef.h
│   │   ├── version_manager.cc
│   │   ├── version_manager.h
│   │   ├── version_store.cc
│   │   └── version_store.h
│   ├── meta/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── meta.h
│   │   ├── meta_agent.cc
│   │   ├── meta_agent.h
│   │   ├── meta_cache.cc
│   │   ├── meta_cache.h
│   │   ├── meta_impl.cc
│   │   ├── meta_impl.h
│   │   ├── meta_service.cc
│   │   ├── meta_service.h
│   │   ├── meta_service_builder.h
│   │   ├── meta_store.h
│   │   ├── meta_store_factory.cc
│   │   ├── meta_store_factory.h
│   │   ├── meta_types.h
│   │   └── sqlite/
│   │       ├── sqlite_meta_store.cc
│   │       ├── sqlite_meta_store.h
│   │       ├── sqlite_statement.cc
│   │       └── sqlite_statement.h
│   ├── metrics/
│   │   ├── CMakeLists.txt
│   │   ├── bvar_metrics_collector.cc
│   │   ├── bvar_metrics_collector.h
│   │   ├── metrics.h
│   │   ├── metrics_collector.cc
│   │   └── metrics_collector.h
│   ├── proto/
│   │   ├── common.proto
│   │   ├── config.proto
│   │   └── proxima_be.proto
│   ├── query/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── collection_query.cc
│   │   ├── collection_query.h
│   │   ├── context.h
│   │   ├── equal_query.cc
│   │   ├── equal_query.h
│   │   ├── equal_task.cc
│   │   ├── equal_task.h
│   │   ├── executor/
│   │   │   ├── bthread_queue.cc
│   │   │   ├── bthread_queue.h
│   │   │   ├── bthread_task.cc
│   │   │   ├── bthread_task.h
│   │   │   ├── executor.h
│   │   │   ├── parallel_executor.cc
│   │   │   ├── parallel_executor.h
│   │   │   ├── scheduler.cc
│   │   │   ├── scheduler.h
│   │   │   ├── task.h
│   │   │   └── task_queue.h
│   │   ├── forward_serializer.cc
│   │   ├── forward_serializer.h
│   │   ├── knn_query.cc
│   │   ├── knn_query.h
│   │   ├── knn_task.cc
│   │   ├── knn_task.h
│   │   ├── meta_wrapper.cc
│   │   ├── meta_wrapper.h
│   │   ├── query.h
│   │   ├── query_agent.cc
│   │   ├── query_agent.h
│   │   ├── query_factory.cc
│   │   ├── query_factory.h
│   │   ├── query_service.cc
│   │   ├── query_service.h
│   │   ├── query_service_builder.h
│   │   └── query_types.h
│   ├── repository/
│   │   ├── CMakeLists.txt
│   │   ├── binlog/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── binlog_common.h
│   │   │   ├── binlog_event.cc
│   │   │   ├── binlog_event.h
│   │   │   ├── binlog_reader.cc
│   │   │   ├── binlog_reader.h
│   │   │   ├── event_fetcher.cc
│   │   │   ├── event_fetcher.h
│   │   │   ├── field.cc
│   │   │   ├── field.h
│   │   │   ├── info_fetcher.cc
│   │   │   ├── info_fetcher.h
│   │   │   ├── log_context.h
│   │   │   ├── mysql_connector.cc
│   │   │   ├── mysql_connector.h
│   │   │   ├── mysql_handler.cc
│   │   │   ├── mysql_handler.h
│   │   │   ├── mysql_reader.h
│   │   │   ├── mysql_validator.cc
│   │   │   ├── mysql_validator.h
│   │   │   ├── rows_event_parser.cc
│   │   │   ├── rows_event_parser.h
│   │   │   ├── sql_builder.cc
│   │   │   ├── sql_builder.h
│   │   │   ├── table_reader.cc
│   │   │   ├── table_reader.h
│   │   │   ├── table_schema.cc
│   │   │   └── table_schema.h
│   │   ├── collection.h
│   │   ├── collection_creator.cc
│   │   ├── collection_creator.h
│   │   ├── collection_manager.cc
│   │   ├── collection_manager.h
│   │   ├── common_types.h
│   │   ├── lsn_context_format.cc
│   │   ├── lsn_context_format.h
│   │   ├── main.cc
│   │   ├── mysql_collection.cc
│   │   ├── mysql_collection.h
│   │   ├── mysql_repository.cc
│   │   ├── mysql_repository.h
│   │   ├── proto/
│   │   │   └── repository_config.proto
│   │   └── repository_common/
│   │       ├── CMakeLists.txt
│   │       ├── config.cc
│   │       ├── config.h
│   │       ├── error_code.cc
│   │       ├── error_code.h
│   │       ├── glogger.cc
│   │       ├── logger.h
│   │       ├── version.cc
│   │       └── version.h
│   └── server/
│       ├── CMakeLists.txt
│       ├── grpc_server.cc
│       ├── grpc_server.h
│       ├── http_server.cc
│       ├── http_server.h
│       ├── main.cc
│       ├── proto_converter.cc
│       ├── proto_converter.h
│       ├── proxima_request_handler.cc
│       ├── proxima_request_handler.h
│       ├── proxima_search_engine.cc
│       ├── proxima_search_engine.h
│       ├── write_request_builder.cc
│       └── write_request_builder.h
├── tests/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── admin/
│   │   ├── CMakeLists.txt
│   │   └── admin_proto_converter_test.cc
│   ├── agent/
│   │   ├── CMakeLists.txt
│   │   ├── collection_counter_test.cc
│   │   └── index_agent_test.cc
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── config_test.cc
│   │   ├── profiler_test.cc
│   │   ├── protobuf_helper_test.cc
│   │   ├── test.proto
│   │   ├── transformer_test.cc
│   │   └── types_helper_test.cc
│   ├── index/
│   │   ├── CMakeLists.txt
│   │   ├── collection_test.cc
│   │   ├── column_indexer_test.cc
│   │   ├── column_reader_test.cc
│   │   ├── delete_store_test.cc
│   │   ├── forward_indexer_test.cc
│   │   ├── forward_reader_test.cc
│   │   ├── id_map_test.cc
│   │   ├── index_service_test.cc
│   │   ├── lsn_store_test.cc
│   │   ├── memory_segment_test.cc
│   │   ├── mock_index_service.h
│   │   ├── mock_segment.h
│   │   ├── persist_hash_map_test.cc
│   │   ├── persist_segment_test.cc
│   │   └── version_manager_test.cc
│   ├── integration/
│   │   ├── README.md
│   │   ├── data/
│   │   │   ├── test_clean_db.sql
│   │   │   ├── test_collection_create_and_remove_full.sql
│   │   │   ├── test_forward_date_and_time_frac_full.sql
│   │   │   ├── test_forward_date_and_time_frac_inc.sql
│   │   │   ├── test_forward_date_and_time_full.sql
│   │   │   ├── test_forward_date_and_time_inc.sql
│   │   │   ├── test_forward_numeric_full.sql
│   │   │   ├── test_forward_numeric_inc.sql
│   │   │   ├── test_forward_with_binary_and_varbinary_full.sql
│   │   │   ├── test_forward_with_binary_and_varbinary_inc.sql
│   │   │   ├── test_forward_with_bit_full.sql
│   │   │   ├── test_forward_with_bit_inc.sql
│   │   │   ├── test_forward_with_blob_full.sql
│   │   │   ├── test_forward_with_blob_gbk_full.sql
│   │   │   ├── test_forward_with_blob_gbk_inc.sql
│   │   │   ├── test_forward_with_blob_inc.sql
│   │   │   ├── test_forward_with_char_and_varchar_full.sql
│   │   │   ├── test_forward_with_char_and_varchar_inc.sql
│   │   │   ├── test_forward_with_charset_gbk_full.sql
│   │   │   ├── test_forward_with_charset_gbk_inc.sql
│   │   │   ├── test_forward_with_charset_utf8_full.sql
│   │   │   ├── test_forward_with_charset_utf8_inc.sql
│   │   │   ├── test_forward_with_decimal_full.sql
│   │   │   ├── test_forward_with_decimal_inc.sql
│   │   │   ├── test_forward_with_empty_value_full.sql
│   │   │   ├── test_forward_with_empty_value_inc.sql
│   │   │   ├── test_forward_with_geometry_full.sql
│   │   │   ├── test_forward_with_geometry_inc.sql
│   │   │   ├── test_forward_with_json_full.sql
│   │   │   ├── test_forward_with_json_inc.sql
│   │   │   ├── test_forward_with_set_and_enum_full.sql
│   │   │   ├── test_forward_with_set_and_enum_inc.sql
│   │   │   ├── test_forward_with_text_full.sql
│   │   │   ├── test_forward_with_text_gbk_full.sql
│   │   │   ├── test_forward_with_text_gbk_inc.sql
│   │   │   ├── test_forward_with_text_inc.sql
│   │   │   ├── test_forward_with_types_null_full.sql
│   │   │   ├── test_forward_with_types_null_inc.sql
│   │   │   ├── test_increment_mode_full.sql
│   │   │   ├── test_increment_mode_inc.sql
│   │   │   ├── test_invalid_lsn_info_full.sql
│   │   │   ├── test_invalid_lsn_info_inc.sql
│   │   │   ├── test_multi_collections_full.sql
│   │   │   ├── test_multi_collections_inc.sql
│   │   │   ├── test_mysql_restart_with_create_collection_full.sql
│   │   │   ├── test_mysql_restart_with_full_mode_full.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_full.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_inc_1.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_inc_2.sql
│   │   │   ├── test_one_field_both_index_and_forward_full.sql
│   │   │   ├── test_one_field_both_index_and_forward_inc.sql
│   │   │   ├── test_one_field_both_index_fields_full.sql
│   │   │   ├── test_one_field_both_index_fields_inc.sql
│   │   │   ├── test_proxima_be_restart_full.sql
│   │   │   ├── test_proxima_be_restart_full_1.sql
│   │   │   ├── test_proxima_be_restart_inc.sql
│   │   │   ├── test_proxima_be_restart_inc_1.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_full.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_inc.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_meta.sql
│   │   │   ├── test_proxima_be_restart_with_full_stage_full.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_full.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_inc_1.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_inc_2.sql
│   │   │   ├── test_repository_restart_full.sql
│   │   │   ├── test_repository_restart_full_1.sql
│   │   │   ├── test_repository_restart_inc.sql
│   │   │   ├── test_repository_restart_inc_1.sql
│   │   │   ├── test_scan_full_table_with_empty_table.sql
│   │   │   ├── test_scan_table.sql
│   │   │   ├── test_suspend_and_resume_collection_full.sql
│   │   │   ├── test_update_collection_full.sql
│   │   │   └── test_update_collection_inc.sql
│   │   ├── run.sh
│   │   ├── script/
│   │   │   ├── restart_proxima_be.sh
│   │   │   ├── restart_repo.sh
│   │   │   ├── run_test.sh
│   │   │   ├── setup_ci.sh
│   │   │   ├── start_mysql.sh
│   │   │   ├── start_proxima_be.sh
│   │   │   └── start_repo.sh
│   │   └── src/
│   │       ├── case/
│   │       │   ├── __init__.py
│   │       │   ├── client_helper.py
│   │       │   ├── collection_creator.py
│   │       │   ├── conf_replacer.py
│   │       │   ├── generate_data.py
│   │       │   ├── global_conf.py
│   │       │   ├── log.py
│   │       │   ├── mysql_client.py
│   │       │   ├── server_utils.py
│   │       │   ├── test_admin_agent.py
│   │       │   ├── test_admin_agent_exception.py
│   │       │   ├── test_index_agent.py
│   │       │   ├── test_index_agent_exception.py
│   │       │   ├── test_mysql_repository.py
│   │       │   ├── test_query_agent.py
│   │       │   └── test_query_agent_exception.py
│   │       ├── requirements.txt
│   │       └── run.py
│   ├── meta/
│   │   ├── CMakeLists.txt
│   │   ├── collection_impl_test.cc
│   │   ├── meta_agent_test.cc
│   │   ├── meta_cache_test.cc
│   │   ├── meta_service_test.cc
│   │   ├── meta_store_factory_test.cc
│   │   ├── mock_meta_service.h
│   │   ├── sqlite_meta_store_test.cc
│   │   ├── statement_test.cc
│   │   └── temp_file_inl.h
│   ├── query/
│   │   ├── CMakeLists.txt
│   │   ├── bthread_queue_test.cc
│   │   ├── equal_query_test.cc
│   │   ├── equal_task_test.cc
│   │   ├── knn_query_test.cc
│   │   ├── knn_task_test.cc
│   │   ├── meta_wrapper_test.cc
│   │   ├── mock_executor.h
│   │   ├── mock_query_context.h
│   │   ├── parallel_executor_test.cc
│   │   ├── query_factory_test.cc
│   │   ├── query_service_test.cc
│   │   ├── scheduler_test.cc
│   │   ├── task-inl.h
│   │   └── task_test.cc
│   ├── repository/
│   │   ├── CMakeLists.txt
│   │   ├── binlog_event_test.cc
│   │   ├── binlog_reader_test.cc
│   │   ├── collection_manager_create_test.cc
│   │   ├── collection_manager_drop_test.cc
│   │   ├── collection_manager_filter_test.cc
│   │   ├── collection_manager_test.cc
│   │   ├── event_builder.h
│   │   ├── event_fetcher_test.cc
│   │   ├── fake_collection.h
│   │   ├── field_test.cc
│   │   ├── info_fetcher_test.cc
│   │   ├── lsn_context_format_test.cc
│   │   ├── mock_collection_creator.h
│   │   ├── mock_index_agent_server.h
│   │   ├── mock_mysql_connector.h
│   │   ├── mock_mysql_handler.h
│   │   ├── mysql_collection_random_test.cc
│   │   ├── mysql_collection_scan_mode_test.cc
│   │   ├── mysql_collection_schema_change_test.cc
│   │   ├── mysql_collection_test.cc
│   │   ├── mysql_handler_test.cc
│   │   ├── mysql_result_builder.h
│   │   ├── mysql_validator_test.cc
│   │   ├── port_helper.h
│   │   ├── repository_test.conf
│   │   ├── rows_event_parser_test.cc
│   │   └── table_reader_test.cc
│   └── server/
│       ├── CMakeLists.txt
│       ├── http_client_test.cc
│       ├── port_helper.h
│       ├── proto_converter_test.cc
│       ├── proxima_search_engine_test.cc
│       └── write_request_builder_test.cc
└── tools/
    ├── CMakeLists.txt
    ├── admin_client.cc
    ├── bench_client.cc
    ├── index_builder.cc
    └── vecs_reader.h

================================================
FILE CONTENTS
================================================

================================================
FILE: .clang-format
================================================
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Defines the Google C++ style for automatic reformatting.
BasedOnStyle: Google
MaxEmptyLinesToKeep: 2
DerivePointerAlignment: false
PointerAlignment: Right
AllowShortFunctionsOnASingleLine: Empty
IncludeBlocks: Merge
IncludeCategories:
  - Regex:           '^<linux/[0-9A-Za-z]+'
    Priority:        100
  - Regex:           '^<mach/[0-9A-Za-z]+'
    Priority:        101
  - Regex:           '^<mach-o/[0-9A-Za-z]+'
    Priority:        102
  - Regex:           '^<sys/[0-9A-Za-z]+'
    Priority:        103
  - Regex:           '^<[0-9A-Za-z]+\.h>$'
    Priority:        200
  - Regex:           '^<[0-9A-Za-z_]+>$'
    Priority:        201
  - Regex:           '^<[0-9A-Za-z_]+\.[0-9A-Za-z]+>$'
    Priority:        202
  - Regex:           '^<[0-9A-Za-z_]+/[0-9A-Za-z]+'
    Priority:        203
  - Regex:           '^\"[0-9A-Za-z_]+/[0-9A-Za-z]+'
    Priority:        300
  - Regex:           '^\"[0-9A-Za-z_]+\.[0-9A-Za-z]+\"$'
    Priority:        301
  - Regex:           '.*'
    Priority:        1000


================================================
FILE: .git/HEAD
================================================
ref: refs/heads/master


================================================
FILE: .git/config
================================================
[core]
	repositoryformatversion = 1
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/alibaba/proximabilin
	tagOpt = --no-tags
	fetch = +refs/heads/master:refs/remotes/origin/master
	promisor = true
	partialclonefilter = blob:limit=1048576
[branch "master"]
	remote = origin
	merge = refs/heads/master


================================================
FILE: .git/description
================================================
Unnamed repository; edit this file 'description' to name the repository.


================================================
FILE: .git/hooks/applypatch-msg.sample
================================================
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.  The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".

. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:


================================================
FILE: .git/hooks/commit-msg.sample
================================================
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message.  The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit.  The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".

# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

# This example catches duplicate Signed-off-by lines.

test "" = "$(grep '^Signed-off-by: ' "$1" |
	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
	echo >&2 Duplicate Signed-off-by lines.
	exit 1
}


================================================
FILE: .git/hooks/fsmonitor-watchman.sample
================================================
#!/usr/bin/perl

use strict;
use warnings;
use IPC::Open2;

# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 2) and last update token
# formatted as a string and outputs to stdout a new update token and
# all files that have been modified since the update token. Paths must
# be relative to the root of the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $last_update_token) = @ARGV;

# Uncomment for debugging
# print STDERR "$0 $version $last_update_token\n";

# Check the hook interface version
if ($version ne 2) {
	die "Unsupported query-fsmonitor hook version '$version'.\n" .
	    "Falling back to scanning...\n";
}

my $git_work_tree = get_working_dir();

my $retry = 1;

my $json_pkg;
eval {
	require JSON::XS;
	$json_pkg = "JSON::XS";
	1;
} or do {
	require JSON::PP;
	$json_pkg = "JSON::PP";
};

launch_watchman();

sub launch_watchman {
	my $o = watchman_query();
	if (is_work_tree_watched($o)) {
		output_result($o->{clock}, @{$o->{files}});
	}
}

sub output_result {
	my ($clockid, @files) = @_;

	# Uncomment for debugging watchman output
	# open (my $fh, ">", ".git/watchman-output.out");
	# binmode $fh, ":utf8";
	# print $fh "$clockid\n@files\n";
	# close $fh;

	binmode STDOUT, ":utf8";
	print $clockid;
	print "\0";
	local $, = "\0";
	print @files;
}

sub watchman_clock {
	my $response = qx/watchman clock "$git_work_tree"/;
	die "Failed to get clock id on '$git_work_tree'.\n" .
		"Falling back to scanning...\n" if $? != 0;

	return $json_pkg->new->utf8->decode($response);
}

sub watchman_query {
	my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
	or die "open2() failed: $!\n" .
	"Falling back to scanning...\n";

	# In the query expression below we're asking for names of files that
	# changed since $last_update_token but not from the .git folder.
	#
	# To accomplish this, we're using the "since" generator to use the
	# recency index to select candidate nodes and "fields" to limit the
	# output to file names only. Then we're using the "expression" term to
	# further constrain the results.
	my $last_update_line = "";
	if (substr($last_update_token, 0, 1) eq "c") {
		$last_update_token = "\"$last_update_token\"";
		$last_update_line = qq[\n"since": $last_update_token,];
	}
	my $query = <<"	END";
		["query", "$git_work_tree", {$last_update_line
			"fields": ["name"],
			"expression": ["not", ["dirname", ".git"]]
		}]
	END

	# Uncomment for debugging the watchman query
	# open (my $fh, ">", ".git/watchman-query.json");
	# print $fh $query;
	# close $fh;

	print CHLD_IN $query;
	close CHLD_IN;
	my $response = do {local $/; <CHLD_OUT>};

	# Uncomment for debugging the watch response
	# open ($fh, ">", ".git/watchman-response.json");
	# print $fh $response;
	# close $fh;

	die "Watchman: command returned no output.\n" .
	"Falling back to scanning...\n" if $response eq "";
	die "Watchman: command returned invalid output: $response\n" .
	"Falling back to scanning...\n" unless $response =~ /^\{/;

	return $json_pkg->new->utf8->decode($response);
}

sub is_work_tree_watched {
	my ($output) = @_;
	my $error = $output->{error};
	if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
		$retry--;
		my $response = qx/watchman watch "$git_work_tree"/;
		die "Failed to make watchman watch '$git_work_tree'.\n" .
		    "Falling back to scanning...\n" if $? != 0;
		$output = $json_pkg->new->utf8->decode($response);
		$error = $output->{error};
		die "Watchman: $error.\n" .
		"Falling back to scanning...\n" if $error;

		# Uncomment for debugging watchman output
		# open (my $fh, ">", ".git/watchman-output.out");
		# close $fh;

		# Watchman will always return all files on the first query so
		# return the fast "everything is dirty" flag to git and do the
		# Watchman query just to get it over with now so we won't pay
		# the cost in git to look up each individual file.
		my $o = watchman_clock();
		$error = $output->{error};

		die "Watchman: $error.\n" .
		"Falling back to scanning...\n" if $error;

		output_result($o->{clock}, ("/"));
		$last_update_token = $o->{clock};

		eval { launch_watchman() };
		return 0;
	}

	die "Watchman: $error.\n" .
	"Falling back to scanning...\n" if $error;

	return 1;
}

sub get_working_dir {
	my $working_dir;
	if ($^O =~ 'msys' || $^O =~ 'cygwin') {
		$working_dir = Win32::GetCwd();
		$working_dir =~ tr/\\/\//;
	} else {
		require Cwd;
		$working_dir = Cwd::cwd();
	}

	return $working_dir;
}


================================================
FILE: .git/hooks/post-update.sample
================================================
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

exec git update-server-info


================================================
FILE: .git/hooks/pre-applypatch.sample
================================================
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".

. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:


================================================
FILE: .git/hooks/pre-commit.sample
================================================
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".

if git rev-parse --verify HEAD >/dev/null 2>&1
then
	against=HEAD
else
	# Initial commit: diff against an empty tree object
	against=$(git hash-object -t tree /dev/null)
fi

# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --type=bool hooks.allownonascii)

# Redirect output to stderr.
exec 1>&2

# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
	# Note that the use of brackets around a tr range is ok here, (it's
	# even required, for portability to Solaris 10's /usr/bin/tr), since
	# the square bracket bytes happen to fall in the designated range.
	test $(git diff-index --cached --name-only --diff-filter=A -z $against |
	  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
	cat <<\EOF
Error: Attempt to add a non-ASCII file name.

This can cause problems if you want to work with people on other platforms.

To be portable it is advisable to rename the file.

If you know what you are doing you can disable this check using:

  git config hooks.allownonascii true
EOF
	exit 1
fi

# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --


================================================
FILE: .git/hooks/pre-merge-commit.sample
================================================
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git merge" with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message to
# stderr if it wants to stop the merge commit.
#
# To enable this hook, rename this file to "pre-merge-commit".

. git-sh-setup
test -x "$GIT_DIR/hooks/pre-commit" &&
        exec "$GIT_DIR/hooks/pre-commit"
:


================================================
FILE: .git/hooks/pre-push.sample
================================================
#!/bin/sh

# An example hook script to verify what is about to be pushed.  Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed.  If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
#   <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).

remote="$1"
url="$2"

zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')

while read local_ref local_oid remote_ref remote_oid
do
	if test "$local_oid" = "$zero"
	then
		# Handle delete
		:
	else
		if test "$remote_oid" = "$zero"
		then
			# New branch, examine all commits
			range="$local_oid"
		else
			# Update to existing branch, examine new commits
			range="$remote_oid..$local_oid"
		fi

		# Check for WIP commit
		commit=$(git rev-list -n 1 --grep '^WIP' "$range")
		if test -n "$commit"
		then
			echo >&2 "Found WIP commit in $local_ref, not pushing"
			exit 1
		fi
	fi
done

exit 0


================================================
FILE: .git/hooks/pre-rebase.sample
================================================
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.

publish=next
basebranch="$1"
if test "$#" = 2
then
	topic="refs/heads/$2"
else
	topic=`git symbolic-ref HEAD` ||
	exit 0 ;# we do not interrupt rebasing detached HEAD
fi

case "$topic" in
refs/heads/??/*)
	;;
*)
	exit 0 ;# we do not interrupt others.
	;;
esac

# Now we are dealing with a topic branch being rebased
# on top of master.  Is it OK to rebase it?

# Does the topic really exist?
git show-ref -q "$topic" || {
	echo >&2 "No such branch $topic"
	exit 1
}

# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
	echo >&2 "$topic is fully merged to master; better remove it."
	exit 1 ;# we could allow it, but there is no point.
fi

# Is topic ever merged to next?  If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master           ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
	not_in_topic=`git rev-list "^$topic" master`
	if test -z "$not_in_topic"
	then
		echo >&2 "$topic is already up to date with master"
		exit 1 ;# we could allow it, but there is no point.
	else
		exit 0
	fi
else
	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
	/usr/bin/perl -e '
		my $topic = $ARGV[0];
		my $msg = "* $topic has commits already merged to public branch:\n";
		my (%not_in_next) = map {
			/^([0-9a-f]+) /;
			($1 => 1);
		} split(/\n/, $ARGV[1]);
		for my $elem (map {
				/^([0-9a-f]+) (.*)$/;
				[$1 => $2];
			} split(/\n/, $ARGV[2])) {
			if (!exists $not_in_next{$elem->[0]}) {
				if ($msg) {
					print STDERR $msg;
					undef $msg;
				}
				print STDERR " $elem->[1]\n";
			}
		}
	' "$topic" "$not_in_next" "$not_in_master"
	exit 1
fi

<<\DOC_END

This sample hook safeguards topic branches that have been
published from being rewound.

The workflow assumed here is:

 * Once a topic branch forks from "master", "master" is never
   merged into it again (either directly or indirectly).

 * Once a topic branch is fully cooked and merged into "master",
   it is deleted.  If you need to build on top of it to correct
   earlier mistakes, a new topic branch is created by forking at
   the tip of the "master".  This is not strictly necessary, but
   it makes it easier to keep your history simple.

 * Whenever you need to test or publish your changes to topic
   branches, merge them into "next" branch.

The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.

With this workflow, you would want to know:

(1) ... if a topic branch has ever been merged to "next".  Young
    topic branches can have stupid mistakes you would rather
    clean up before publishing, and things that have not been
    merged into other branches can be easily rebased without
    affecting other people.  But once it is published, you would
    not want to rewind it.

(2) ... if a topic branch has been fully merged to "master".
    Then you can delete it.  More importantly, you should not
    build on top of it -- other people may already want to
    change things related to the topic as patches against your
    "master", so if you need further changes, it is better to
    fork the topic (perhaps with the same name) afresh from the
    tip of "master".

Let's look at this example:

		   o---o---o---o---o---o---o---o---o---o "next"
		  /       /           /           /
		 /   a---a---b A     /           /
		/   /               /           /
	       /   /   c---c---c---c B         /
	      /   /   /             \         /
	     /   /   /   b---b C     \       /
	    /   /   /   /             \     /
    ---o---o---o---o---o---o---o---o---o---o---o "master"


A, B and C are topic branches.

 * A has one fix since it was merged up to "next".

 * B has finished.  It has been fully merged up to "master" and "next",
   and is ready to be deleted.

 * C has not merged to "next" at all.

We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.

To compute (1):

	git rev-list ^master ^topic next
	git rev-list ^master        next

	if these match, topic has not merged in next at all.

To compute (2):

	git rev-list master..topic

	if this is empty, it is fully merged to "master".

DOC_END


================================================
FILE: .git/hooks/pre-receive.sample
================================================
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".

if test -n "$GIT_PUSH_OPTION_COUNT"
then
	i=0
	while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
	do
		eval "value=\$GIT_PUSH_OPTION_$i"
		case "$value" in
		echoback=*)
			echo "echo from the pre-receive-hook: ${value#*=}" >&2
			;;
		reject)
			exit 1
		esac
		i=$((i + 1))
	done
fi


================================================
FILE: .git/hooks/prepare-commit-msg.sample
================================================
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source.  The hook's purpose is to edit the commit
# message file.  If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".

# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output.  It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited.  This is rarely a good idea.

COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3

/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"

# case "$COMMIT_SOURCE,$SHA1" in
#  ,|template,)
#    /usr/bin/perl -i.bak -pe '
#       print "\n" . `git diff --cached --name-status -r`
# 	 if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
#  *) ;;
# esac

# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
#   /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi


================================================
FILE: .git/hooks/push-to-checkout.sample
================================================
#!/bin/sh

# An example hook script to update a checked-out tree on a git push.
#
# This hook is invoked by git-receive-pack(1) when it reacts to git
# push and updates reference(s) in its repository, and when the push
# tries to update the branch that is currently checked out and the
# receive.denyCurrentBranch configuration variable is set to
# updateInstead.
#
# By default, such a push is refused if the working tree and the index
# of the remote repository has any difference from the currently
# checked out commit; when both the working tree and the index match
# the current commit, they are updated to match the newly pushed tip
# of the branch. This hook is to be used to override the default
# behaviour; however the code below reimplements the default behaviour
# as a starting point for convenient modification.
#
# The hook receives the commit with which the tip of the current
# branch is going to be updated:
commit=$1

# It can exit with a non-zero status to refuse the push (when it does
# so, it must not modify the index or the working tree).
die () {
	echo >&2 "$*"
	exit 1
}

# Or it can make any necessary changes to the working tree and to the
# index to bring them to the desired state when the tip of the current
# branch is updated to the new commit, and exit with a zero status.
#
# For example, the hook can simply run git read-tree -u -m HEAD "$1"
# in order to emulate git fetch that is run in the reverse direction
# with git push, as the two-tree form of git read-tree -u -m is
# essentially the same as git switch or git checkout that switches
# branches while keeping the local changes in the working tree that do
# not interfere with the difference between the branches.

# The below is a more-or-less exact translation to shell of the C code
# for the default behaviour for git's push-to-checkout hook defined in
# the push_to_deploy() function in builtin/receive-pack.c.
#
# Note that the hook will be executed from the repository directory,
# not from the working tree, so if you want to perform operations on
# the working tree, you will have to adapt your code accordingly, e.g.
# by adding "cd .." or using relative paths.

if ! git update-index -q --ignore-submodules --refresh
then
	die "Up-to-date check failed"
fi

if ! git diff-files --quiet --ignore-submodules --
then
	die "Working directory has unstaged changes"
fi

# This is a rough translation of:
#
#   head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
if git cat-file -e HEAD 2>/dev/null
then
	head=HEAD
else
	head=$(git hash-object -t tree --stdin </dev/null)
fi

if ! git diff-index --quiet --cached --ignore-submodules $head --
then
	die "Working directory has staged changes"
fi

if ! git read-tree -u -m "$commit"
then
	die "Could not update working tree to new HEAD"
fi


================================================
FILE: .git/hooks/sendemail-validate.sample
================================================
#!/bin/sh

# An example hook script to validate a patch (and/or patch series) before
# sending it via email.
#
# The hook should exit with non-zero status after issuing an appropriate
# message if it wants to prevent the email(s) from being sent.
#
# To enable this hook, rename this file to "sendemail-validate".
#
# By default, it will only check that the patch(es) can be applied on top of
# the default upstream branch without conflicts in a secondary worktree. After
# validation (successful or not) of the last patch of a series, the worktree
# will be deleted.
#
# The following config variables can be set to change the default remote and
# remote ref that are used to apply the patches against:
#
#   sendemail.validateRemote (default: origin)
#   sendemail.validateRemoteRef (default: HEAD)
#
# Replace the TODO placeholders with appropriate checks according to your
# needs.

validate_cover_letter () {
	file="$1"
	# TODO: Replace with appropriate checks (e.g. spell checking).
	true
}

validate_patch () {
	file="$1"
	# Ensure that the patch applies without conflicts.
	git am -3 "$file" || return
	# TODO: Replace with appropriate checks for this patch
	# (e.g. checkpatch.pl).
	true
}

validate_series () {
	# TODO: Replace with appropriate checks for the whole series
	# (e.g. quick build, coding style checks, etc.).
	true
}

# main -------------------------------------------------------------------------

if test "$GIT_SENDEMAIL_FILE_COUNTER" = 1
then
	remote=$(git config --default origin --get sendemail.validateRemote) &&
	ref=$(git config --default HEAD --get sendemail.validateRemoteRef) &&
	worktree=$(mktemp --tmpdir -d sendemail-validate.XXXXXXX) &&
	git worktree add -fd --checkout "$worktree" "refs/remotes/$remote/$ref" &&
	git config --replace-all sendemail.validateWorktree "$worktree"
else
	worktree=$(git config --get sendemail.validateWorktree)
fi || {
	echo "sendemail-validate: error: failed to prepare worktree" >&2
	exit 1
}

unset GIT_DIR GIT_WORK_TREE
cd "$worktree" &&

if grep -q "^diff --git " "$1"
then
	validate_patch "$1"
else
	validate_cover_letter "$1"
fi &&

if test "$GIT_SENDEMAIL_FILE_COUNTER" = "$GIT_SENDEMAIL_FILE_TOTAL"
then
	git config --unset-all sendemail.validateWorktree &&
	trap 'git worktree remove -ff "$worktree"' EXIT &&
	validate_series
fi


================================================
FILE: .git/hooks/update.sample
================================================
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
#   This boolean sets whether unannotated tags will be allowed into the
#   repository.  By default they won't be.
# hooks.allowdeletetag
#   This boolean sets whether deleting tags will be allowed in the
#   repository.  By default they won't be.
# hooks.allowmodifytag
#   This boolean sets whether a tag may be modified after creation. By default
#   it won't be.
# hooks.allowdeletebranch
#   This boolean sets whether deleting branches will be allowed in the
#   repository.  By default they won't be.
# hooks.denycreatebranch
#   This boolean sets whether remotely creating branches will be denied
#   in the repository.  By default this is allowed.
#

# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"

# --- Safety check
if [ -z "$GIT_DIR" ]; then
	echo "Don't run this script from the command line." >&2
	echo " (if you want, you could supply GIT_DIR then run" >&2
	echo "  $0 <ref> <oldrev> <newrev>)" >&2
	exit 1
fi

if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
	echo "usage: $0 <ref> <oldrev> <newrev>" >&2
	exit 1
fi

# --- Config
allowunannotated=$(git config --type=bool hooks.allowunannotated)
allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
allowmodifytag=$(git config --type=bool hooks.allowmodifytag)

# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
	echo "*** Project description file hasn't been set" >&2
	exit 1
	;;
esac

# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
if [ "$newrev" = "$zero" ]; then
	newrev_type=delete
else
	newrev_type=$(git cat-file -t $newrev)
fi

case "$refname","$newrev_type" in
	refs/tags/*,commit)
		# un-annotated tag
		short_refname=${refname##refs/tags/}
		if [ "$allowunannotated" != "true" ]; then
			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
			exit 1
		fi
		;;
	refs/tags/*,delete)
		# delete tag
		if [ "$allowdeletetag" != "true" ]; then
			echo "*** Deleting a tag is not allowed in this repository" >&2
			exit 1
		fi
		;;
	refs/tags/*,tag)
		# annotated tag
		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
		then
			echo "*** Tag '$refname' already exists." >&2
			echo "*** Modifying a tag is not allowed in this repository." >&2
			exit 1
		fi
		;;
	refs/heads/*,commit)
		# branch
		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
			echo "*** Creating a branch is not allowed in this repository" >&2
			exit 1
		fi
		;;
	refs/heads/*,delete)
		# delete branch
		if [ "$allowdeletebranch" != "true" ]; then
			echo "*** Deleting a branch is not allowed in this repository" >&2
			exit 1
		fi
		;;
	refs/remotes/*,commit)
		# tracking branch
		;;
	refs/remotes/*,delete)
		# delete tracking branch
		if [ "$allowdeletebranch" != "true" ]; then
			echo "*** Deleting a tracking branch is not allowed in this repository" >&2
			exit 1
		fi
		;;
	*)
		# Anything else (is there anything else?)
		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
		exit 1
		;;
esac

# --- Finished
exit 0


================================================
FILE: .git/info/exclude
================================================
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~


================================================
FILE: .git/logs/HEAD
================================================
0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> 1779057964 +0000	clone: from https://github.com/alibaba/proximabilin


================================================
FILE: .git/logs/refs/heads/master
================================================
0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> 1779057964 +0000	clone: from https://github.com/alibaba/proximabilin


================================================
FILE: .git/logs/refs/remotes/origin/HEAD
================================================
0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> 1779057964 +0000	clone: from https://github.com/alibaba/proximabilin


================================================
FILE: .git/objects/pack/pack-50d7469b15937123b6a9d2f6b0fef35befd95527.pack
================================================
[File too large to display: 24.3 MB]

================================================
FILE: .git/objects/pack/pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor
================================================


================================================
FILE: .git/objects/pack/pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor
================================================
42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/heads/master


================================================
FILE: .git/packed-refs
================================================
# pack-refs with: peeled fully-peeled sorted 
42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/remotes/origin/master


================================================
FILE: .git/refs/heads/master
================================================
42a1afe8b35dd3f7c66a06d6194a277c8ba13300


================================================
FILE: .git/refs/remotes/origin/HEAD
================================================
ref: refs/remotes/origin/master


================================================
FILE: .git/shallow
================================================
42a1afe8b35dd3f7c66a06d6194a277c8ba13300


================================================
FILE: .gitignore
================================================
.*
*~
bazel-*
build/*
build
build.debug
build.release
bin/*
lib/*
var/*
venv*
cmake-build-debug/*
tests/integration/conf/*
**/__pycache__/*
tests/bench/log/*
tests/integration/integration
tests/integration/log
!.git*
!.clang-format
!.circleci
!.drone.yml

sdk/python/pyproximabe/proto/*
!sdk/python/pyproximabe/proto/__init__.py
sdk/python/dist/
sdk/python/pyproximase.egg-info/

GPATH
GRTAGS
GTAGS
sdk/python/pyproximabe/version.py
deps/thirdparty/sqlite/sqlite-*

docs/public/
docs/resources/
docs/node_modules/
docs/package-lock.json


================================================
FILE: .gitmodules
================================================
[submodule "deps/thirdparty/brpc/brpc"]
	path = deps/thirdparty/brpc/brpc
	url = https://github.com/apache/incubator-brpc.git
[submodule "deps/thirdparty/gflags/gflags"]
	path = deps/thirdparty/gflags/gflags
	url = https://github.com/gflags/gflags.git
[submodule "deps/thirdparty/glog/glog"]
	path = deps/thirdparty/glog/glog
	url = https://github.com/google/glog.git
[submodule "deps/thirdparty/googletest/googletest"]
	path = deps/thirdparty/googletest/googletest
	url = https://github.com/google/googletest.git
[submodule "deps/thirdparty/protobuf/protobuf"]
	path = deps/thirdparty/protobuf/protobuf
	url = https://github.com/protocolbuffers/protobuf.git
[submodule "deps/thirdparty/snappy/snappy"]
	path = deps/thirdparty/snappy/snappy
	url = https://github.com/google/snappy.git
[submodule "deps/thirdparty/sparsehash/sparsehash"]
	path = deps/thirdparty/sparsehash/sparsehash
	url = https://github.com/sparsehash/sparsehash.git
[submodule "deps/thirdparty/leveldb/leveldb"]
	path = deps/thirdparty/leveldb/leveldb
	url = https://github.com/google/leveldb.git


================================================
FILE: CMakeLists.txt
================================================
##
##  Copyright (C) The Software Authors. All rights reserved.
##
##  \file     CMakeLists.txt
##  \author   xiaoxin.gxx
##  \date     Nov 2020
##  \version  1.0
##  \brief    Detail cmake build script
##

cmake_minimum_required(VERSION 3.1)
cmake_policy(SET CMP0048 NEW)
project(proxima-be-project)

include(cmake/bazel.cmake)
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)

# Install benchmark tools
execute_process(
    COMMAND ${CMAKE_COMMAND} -E create_symlink
    ${CMAKE_CURRENT_SOURCE_DIR}/benchmark ${CMAKE_CURRENT_BINARY_DIR}/benchmark
  )

# Install git hooks
execute_process(
    COMMAND sh scripts/install-git-hooks.sh
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  )

cc_directory(deps/thirdparty)
cc_directory(deps/proxima/)
get_property(PROXIMA_LIB GLOBAL PROPERTY proxima_lib_property)
set(LIB_PATH "${PROXIMA_LIB}:$ORIGIN/../lib64:$ORIGIN/../lib:$ORIGIN")

cc_directories(src tests sdk tools)

if (ENABLE_LOCAL_INTEGRATION)
  add_custom_command(OUTPUT integration_test
    COMMAND bash tests/integration/run.sh local
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
    COMMENT "Running integration tests"
    VERBATIM
  )
else()
  add_custom_command(OUTPUT integration_test
    COMMAND bash tests/integration/run.sh docker
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
    COMMENT "Running integration tests"
    VERBATIM
  ) 
endif()
add_custom_target(integration DEPENDS integration_test)

# install conf files
install(FILES scripts/conf/proxima_be.conf DESTINATION ${CMAKE_INSTALL_BINDIR}/../conf)

git_version(GIT_SRCS_VER ${CMAKE_CURRENT_SOURCE_DIR})
set(CPACK_PACKAGE_VERSION ${GIT_SRCS_VER})
set(CPACK_PACKAGE_NAME proxima-be)
include(CPack)


================================================
FILE: Dockerfile
================================================
##  Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.
##
##  Licensed under the Apache License, Version 2.0 (the "License");
##  you may not use this file except in compliance with the License.
##  You may obtain a copy of the License at
##
##      http://www.apache.org/licenses/LICENSE-2.0
##
##  Unless required by applicable law or agreed to in writing, software
##  distributed under the License is distributed on an "AS IS" BASIS,
##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
##  See the License for the specific language governing permissions and
##  limitations under the License.

FROM debian:buster-20210721 AS builder

ARG BUILD_DIR=/src/build.docker
ARG SRC_DIR=/src
ARG BE_DIR=/var/lib/proxima-be
ARG CMAKE_ARG="-DCMAKE_BUILD_TYPE=Release -DENABLE_HASWELL=ON"

WORKDIR $SRC_DIR

RUN apt update && \
    apt install -y --no-install-recommends \
    git \
    ca-certificates \
    cmake \
    build-essential \
    zlib1g-dev \
    pkg-config

COPY . $SRC_DIR
RUN cd $SRC_DIR && git submodule update --init
RUN mkdir -p $BUILD_DIR && cmake -B $BUILD_DIR -DCMAKE_INSTALL_PREFIX:PATH=${BE_DIR} $CMAKE_ARG $SRC_DIR && cmake --build $BUILD_DIR --target install/strip -- -j


FROM debian:buster-20210721
WORKDIR /var/lib/proxima-be

COPY --from=builder /var/lib/proxima-be /var/lib/proxima-be
CMD [ "/var/lib/proxima-be/bin/proxima_be", "--config", "/var/lib/proxima-be/conf/proxima_be.conf" ]


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

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

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: README.md
================================================
# Proxima Bilin Engine

## 背景介绍

随着 AI 技术的广泛应用,以及数据规模的不断增长,对非结构化数据处理的需求也日益增多。向量检索也逐渐成了 AI 技术链路中不可或缺的一环,同时也是对传统搜索技术的补充。

Proxima 是阿里巴巴达摩院系统 AI 实验室自研的向量检索内核。目前,其核心能力广泛应用于阿里巴巴和蚂蚁集团内众多业务,如淘宝搜索和推荐、蚂蚁人脸支付、优酷视频搜索、阿里妈妈广告检索等。同时,Proxima 还深度集成在各式各类的大数据和数据库产品中,如阿里云 Hologres、搜索引擎 Elastic Search 和 ZSearch、离线引擎 MaxCompute (ODPS) 等,为其提供向量检索的能力。

Proxima BE,全称 Proxima Bilin Engine,是 Proxima 团队开发的服务化引擎,实现了对大数据的高性能相似性搜索。支持 RESTful HTTP 接口访问,同时也支持多种语言的 SDK 以 GRPC 协议访问。

## 核心能力

<p align="center">
<img src="resources/images/main.png" width="70%" height="70%">
</p>

<br>

Proxima BE 的主要核心能力有以下几点:

* **支持单机超大规模索引**:基于底层向量索引的工程和检索算法优化,使得有限成本下,实现了高效率的检索方法,并支持磁盘索引,单片索引可达几十亿的规模。

* **支持多数据源全量和增量同步**:通过 Mysql Repository 等组件,可将 mysql 等数据源中的数据,实时同步至索引服务,提供查询能力,简化数据处理流程。

* **支持向量索引实时增删改查**:基于全新 CRUD 图索引,支持在线大规模向量索引的从 0 到 1 的流式写入,并实现了索引即时增删改查,避免索引需定期重建。

* **支持正排数据查询**:支持在查询时,可展示文档的所有结构化字段。同时后期将基于此功能,进一步扩展出与文本与向量联合检索等功能。

## 如何构建

环境要求:

* Linux or MacOS
* gcc >= 4.9
* cmake >= 3.14

```shell
git clone https://github.com/alibaba/proximabilin.git
cd proximabilin && git submodule update --init

mkdir build && cd build

# Build with Debug (Intel Haswell Microarchitecture)
#cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_HASWELL=ON ..

# Build with Release (Intel Haswell Microarchitecture)
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_HASWELL=ON ..

make -j all
```


## 获取 Docker 镜像

| 平台 | 仓库 | 版本 |
| -------- | ------ | ------ |
| Linux X86_64 | ghcr.io/proximabilin/proxima-be | 0.2.0 |

## 快速开始

* [安装指南](https://proximabilin.github.io/docs/gettingstarted/installation/)
* [使用示例](https://proximabilin.github.io/docs/gettingstarted/example_usage/)

## 使用手册

* [进阶指南](https://proximabilin.github.io/docs/advancedguides/)
* [API 手册](https://proximabilin.github.io/docs/apireference/http/)
* [SDK 手册](https://proximabilin.github.io/docs/sdkreference/)
* [常见问题](https://proximabilin.github.io/docs/faq/)

## 案列展示

## License

[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)

## 声明

Proxima BE 依赖了如下项目:

* [brpc](https://github.com/apache/incubator-brpc)
* [protobuf](https://github.com/protocolbuffers/protobuf.git)
* [sqlite](https://github.com/sqlite/sqlite)
* [sparsehash](https://github.com/sparsehash/sparsehash)
* [mysql](https://github.com/mysql)


================================================
FILE: benchmark/README.md
================================================
# Proxima SE Benchmark Toolkits
Stand along toolkits for Benchmark test of ProximaSE 
## 1. Requirements
* Python3 (Above 3.6 with setuptools and pip installed)
    * [VirtualEnv](https://virtualenv.pypa.io/en/latest/) Optional, recommend using virtualenv to isolate python environment of ProximaSE

## 2. Environments
* Machine and OS refers to ProximaSE
* MYSQL, The payload of benchmark tests

## 3. Install
Do not need to install, just run it under the directory where toolkits located

## 4. Run

### 4.1 ProximaSE Build Benchmark Tools
#### 4.1.1 Procedure
```text
Step 1: Prepared Repository for ProximaSE
        Requirements: 
          i: table should have first column named by id with property auto_increment
         ii: vector column should be prefixed by vector
        iii: all columns treated as forward attributes except vector and id    
Step 2: Clone source code of ProximaSE
        cd (source of ProximaSE)
Step 3: Build ProximaSE
        mkdir build; cd build; cmake ../; make -j  
Step 4: Run Bench tools
        cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL
        PYTHONPATH=$(pwd) python scripts/build_bench.py 
```

#### 4.1.2 Help
```shell
$python scripts/build_bench.py 
Usage: build_bench.py [options]

Options:
  -h, --help            show this help message and exit
  --build_root=BUILD_ROOT
                        The build directory of ProximaSE, default value: [ENV
                        variable PROXIMA_SE_BUILD_ROOT or '$(pwd)/../build']
  --repo=JDBC           The source of repository, represented by jdbc string
  -t TABLE, --table=TABLE
                        Target table sync to ProximaSE
  --counts=COUNTS       The number of records will be sync to ProximaSE
  --log_dir=LOG_DIR     Log directory, default is logs
  --grpc_port=GRPC_PORT
                        Proxima SE GRPC service port, default 16000
  --http_port=HTTP_PORT
                        Proxima SE GRPC service port, default 16100
  --index_build_threads=INDEX_BUILD_THREADS
                        Index Agent build threads count, default is 10
  --index_build_qps=INDEX_BUILD_QPS
                        Threshold QPS of incremental records, default 1000000
  --index_directory=INDEX_DIRECTORY
                        Index directory, where indices located, default is
                        'indices'
  --max_docs_per_segment=MAX_DOCS_PER_SEGMENT
                        Max records per segment, default 1000000
  --meta_uri=META_URI   URI of meta store, meta/meta.sqlite
  -o OUTPUT, --output_dir=OUTPUT
                        Output directory, default random directory
  --cleanup             Cleanup all the outputs after finished
  --timeout=TIMEOUT     Timeout in seconds, default is 86400
  --interval=INTERVAL   Progress flush interval, default is 5 seconds
  --report=REPORT       Report file, default write to [output]/report.json
  --summary_progress=SUMMARY
                        Extract interested (approximate Progress, separated by
                        ',') progress records from reports
  --summary_interval=SUMMARY_INTERVAL
                        Extract interested progress records from reports
```

### 4.1.3 Example
Test benchmark with the dataset of face512d
```shell
python scripts/build_bench.py --repo=mysql://root:123456@127.0.0.1:3306/vts_face_fp32_512d \
    -t vts_face_fp32_512d_2w \
    --output vts_face_fp32_512d_2w
```
The report was located in the current directory named by vts_face_fp32_512d_2w, layout as following:
```text
$tree vts_face_fp32_512d_2w/
vts_face_fp32_512d_2w/
├── conf
│   ├── mysql_repo.conf
│   └── proxima_se.conf
├── indices
│   └── vts_face_fp32_512d_2w
│       ├── data.del
│       ├── data.fwd.0
│       ├── data.id
│       ├── data.manifest
│       └── data.pxa.vector.0
├── logs
│   ├── mysql.repo.log
│   ├── proxima_se_stderr.log
│   ├── proxima_se_stdout.log
│   ├── repo
│   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135327.106363
│   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135311.106363
│   │   ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135327.106363
│   │   ├── proxima_se.log.ERROR -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135327.106363
│   │   ├── proxima_se.log.INFO -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135311.106363
│   │   └── proxima_se.log.WARNING -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135327.106363
│   └── be
│       ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135304.106289
│       ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135300.106289
│       ├── proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135304.106289
│       ├── proxima_se.log.ERROR -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.ERROR.20210113-135304.106289
│       ├── proxima_se.log.INFO -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.INFO.20210113-135300.106289
│       └── proxima_se.log.WARNING -> proxima_se.log.a99a05626.na61.xiaoxin.gxx.log.WARNING.20210113-135304.106289
├── meta
│   └── meta.sqlite
└── report.json

7 directories, 24 files
```

### 4.2 ProximaSE Query Benchmark Tools
#### 4.2.1 Procedure
```text
Step 1: Prepared Repository for ProximaSE
        Requirements: 
          i: ProximaSE should run outside of tools
         ii: Queries which should stored in mysql, with two columns named by id and vector, vector is string format, separated by ","     
Step 2: Clone source code of ProximaSE
        cd (source of ProximaSE)
Step 3: Build ProximaSE
        mkdir build; cd build; cmake ../; make -j  
Step 4: Run Bench tools
        cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL
        PYTHONPATH=$(pwd) python scripts/query_bench.py -h  
```

#### 4.2.2 Help
```shell
python scripts/query_bench.py -h 
Usage: query_bench.py [options]

Options:
  -h, --help            show this help message and exit
  --query=QUERY         The source of query, which should be DB connection
  --table=TABLE         Table name
  --collection=COLLECTION
                        Proxima SE collection
  --host=HOST           Proxima SE grpc service
  --topk=TOPK           Proxima SE topk, separated by ','
  --threads=THREADS     Number of threads to run test
  --http                Using http proto to test, default is grpc
  --timeout=TIMEOUT     Total seconds for test
  --interval=INTERVAL   Seconds for summary duration

```

### 4.2.3 Example
Test benchmark with the dataset of address512d
```shell
# Test Http protocol
python scripts/query_bench.py \
    --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \
    --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \
    --host 33.11.240.73:16000 --topk=100 --threads=50 --http
    
# Test GRPC protocol  
python scripts/query_bench.py \
    --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \
    --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \
    --host 33.11.240.73:16000 --topk=100 --threads=50 
```
The report was output on terminal, after finished test, output as following:
```text
....
python scripts/query_bench.py --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d --host 33.11.240.73:16000 --topk=100 --threads=50 
INFO 2021-03-08 17:44:38,747 query_bench.py:225:<module> 	Arguments: {'query': 'mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d', 'table': 'vts_face_fp32_512d_q', 'collection': 'vts_face_fp32_512d', 'host': '33.11.240.73:16000', 'topk': '100', 'threads': '50', 'http': False, 'timeout': 60, 'interval': 2}
INFO 2021-03-08 17:44:38,747 query_bench.py:78:init 	Init BenchContext.
   Total   Succeed   Failed     QPS  Latency(AVG)  Latency(Min)  Latency(Max)
      87        87        0      71            87            13           164
     908       908        0     453           109            12           251
     963       963        0     479           103            13           212
     979       979        0     488           101            15           248
     971       971        0     460           108            13           427
     948       948        0     467           106            13           254
     913       913        0     455           109            14           242
     883       883        0     437           114            12           267
     933       933        0     460           108            14           249
     946       946        0     470           105            16           234
     940       940        0     468           106            12           236
     947       947        0     470           105            18           254
     965       965        0     480           103            15           233
     933       933        0     464           106            11           244
     992       992        0     481           103            12           254
     968       968        0     480           103            16           259
     942       942        0     467           106            16           249
```

### 4.2.4 Cluster mode of bench test
If you’re planning to run large-scale load tests you need run query_bench distributed mode.
#### 4.2.4.1 Example:
```Shell
for i in $(seq 5); do
    python scripts/query_bench.py \
        --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d \
        --table=vts_face_fp32_512d_q --collection=vts_face_fp32_512d \
        --host 33.11.240.73:16000 --topk=100 --threads=50 &
done 
```

### 4.3 ProximaSE Recall Tools
#### 4.3.1 Procedure
```text
Step 1: Start ProximaSE outside
Step 2: Prepare Queries of Recall test 
Step 3: Clone source code of ProximaSE
        cd (source of ProximaSE)
Step 4: Build ProximaSE
        mkdir build; cd build; cmake ../; make -j  
Step 5: Run Bench tools
        cd benchmark; pip install -i https://pypi.antfin-inc.com/simple/ -r requirements.txt; pip install PyMySQL
        PYTHONPATH=$(pwd) python scripts/recall.py 
```

#### 4.3.2 Help
```shell
$python scripts/recall.py -h 
Usage: recall.py [options]

Options:
  -h, --help            show this help message and exit
  --query=QUERY         The source of query, which should be DB connection
  --table=TABLE         Table name
  --collection=COLLECTION
                        Proxima SE collection
  --host=HOST           Proxima SE grpc service
  --gt=GT               Proxima SE GT file
  --topk=TOPK           Proxima SE topk, separated by ','
  --counts=COUNTS       Proxima SE query counts
  --dump_mismatch       Dump mismatched result
```

### 4.3.3 Example
Test benchmark with the dataset of face512d
```shell
python scripts/recall.py --query=mysql://root:123456@11.139.184.242:3306/vts_face_fp32_512d  \
    --table=vts_face_fp32_512d_q \
    --collection=vts_face_fp32_512d --topk=1,50,100,200 \
    --host 11.139.203.151:18000  --dump_mismatch \
    --counts=5
INFO 2021-01-28 09:33:59,276 recall.py:37:init 	Init BenchContext.
Processed    @1(%)   @50(%)  @100(%)  @200(%)
        1    100.0     98.0     98.0     98.0
       25    100.0    99.92    99.84    99.72
       50    100.0    99.92    99.86    99.76
       75    100.0    99.92    99.88    99.71
      100     99.0    99.94    99.89    99.66
      125     99.2    99.79    99.78    99.55
      150    99.33    99.79    99.77    99.55
      175    99.43    99.78    99.77    99.55
      200     99.5     99.8    99.76    99.56
      225    99.56    99.81    99.78    99.58
      250     99.6    99.81    99.78    99.58
      275    99.64    99.81    99.76    99.57
      300    99.67     99.8    99.75    99.57
      325    99.69     99.8    99.75    99.57
      350    99.71    99.81    99.74    99.57
      375    99.73    99.81    99.74    99.58
      400    99.75    99.81    99.74    99.57
      425    99.76    99.81    99.74    99.56
      450    99.78    99.82    99.74    99.56
      475    99.79    99.81    99.75    99.57
      500     99.8    99.82    99.76    99.58
--------------------Recall Tests------------------
Processed    @1(%)   @50(%)  @100(%)  @200(%)
      500     99.8    99.82    99.76    99.58
```


================================================
FILE: benchmark/__init__.py
================================================
# Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__all__ = ['common']


================================================
FILE: benchmark/common/__init__.py
================================================
# Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__all__ = ['exceptions', 'runner', 'proxima_se_service']


================================================
FILE: benchmark/common/exceptions.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# base library for proxima se bench toolkits
#

__all__ = ['ProximaSEException', 'FileNotExits']


class ProximaSEException(Exception):
    """Base Error Unknown type."""

    def __init__(self, message, response_header, response_data):
        ProximaSEException.__init__(
            message, response_header, response_data)


class FileNotExits(ProximaSEException):
    def __init__(self, file):
        ProximaSEException.__init__("%s does not exists" % file,
                                    None, None)


class PropKeyExceptions(ProximaSEException):
    def __init__(self, key):
        ProximaSEException.__init__("%s does not exists" % key,
                                    None, None)


================================================
FILE: benchmark/common/mysql_utils.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE query
#
import logging
from urllib.parse import urlparse

import pymysql


class MySQL(object):
    @staticmethod
    def connect_db(uri):
        if not uri or not uri.scheme or uri.scheme.lower() != 'mysql':
            return None

        database = uri.path.strip('/').rstrip('/') if uri.path else None
        if not database or database.find('/') != -1:
            return None

        connection = None
        try:
            connection = pymysql.connect(
                host=uri.hostname,
                user=uri.username,
                passwd=uri.password,
                db=uri.path.strip('/').rstrip('/'),
                # charset='utf8mb4',
                port=uri.port
            )
        except Exception as e:
            logging.error(f'Can not connect to mysql {uri.netloc}')
        return connection

    @staticmethod
    def connect(jdbc_str):
        uri = urlparse(jdbc_str)
        return MySQL.connect_db(uri)

    @staticmethod
    def close(connection):
        connection.close()

    @staticmethod
    def execute(cursor, sql):
        cursor.execute(sql)
        return cursor.fetchall()

    @staticmethod
    def counts(conn, table):
        with conn.cursor() as cursor:
            result = MySQL.execute(cursor, f'select count(*) from {table}')
            return result[0][0] if result else 0

    @staticmethod
    def schema(conn, table):
        with conn.cursor() as cursor:
            result = MySQL.execute(cursor, f'show full columns from {table}')
            return [c[:1] for c in result]

    @staticmethod
    def tables(conn):
        with conn.cursor() as cursor:
            result = MySQL.execute(cursor, "show tables")
            data = [c for i in result for c in i]
            return data


================================================
FILE: benchmark/common/proxima2_dataset.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima2 Vectors reader
#
import logging
import math
import os
import json
import struct
import sys
from enum import IntEnum
from mmap import mmap
from typing import Optional, Any, Tuple


class StorageObject(object):
    def __init__(self, fmt: str = ''):
        self._fmt = fmt

    def calcsize(self):
        """The size of storage, counted by bytes, override if size of derived class is inconstant"""
        return struct.calcsize(self._fmt)

    def fmt(self):
        return self._fmt

    def pack(self):
        pass

    def unpack(self, buffer, offset=0):
        pass

    def json(self):
        return json.dumps(self, indent=4, default=lambda o: o.__dict__)


class DatasetHeader(StorageObject):
    def __init__(self):
        StorageObject.__init__(self, 'QI')
        self._num_vectors = 0
        self._meta_size = 0

    def __del__(self):
        pass

    def pack(self):
        return struct.pack(self.fmt(), self._num_vectors, self._meta_size)

    def unpack(self, buffer, offset=0):
        self._num_vectors, self._meta_size = struct.unpack_from(self.fmt(), buffer, offset)

    def num_vectors(self):
        return self._num_vectors

    def meta_size(self):
        return self._meta_size

    def meta_base(self):
        return self.calcsize()

    def vectors_base(self):
        return self.calcsize() + self._meta_size


class MetaHeader(StorageObject):
    def __init__(self):
        StorageObject.__init__(self, 'IHHIIQIIIIIIIIII')
        self._fmts = ['IHHIIQII', 'IIIIIIII']
        self._header_size = 0  # 4 bytes
        self._major_order = 0  # 2 bytes
        self._type = 0  # 2 bytes
        self._dimension = 0  # 4 bytes
        self._unit_size = 0  # 4 bytes
        self._space_id = 0  # 8 bytes
        self._attachment_offset = 0  # 4 bytes
        self._attachment_size = 0  # 4 bytes
        self._reserve = (0, 0, 0, 0, 0, 0, 0, 0)  # 32 bytes
        self._attachment = {}

    def __del__(self):
        pass

    def pack(self):
        return b''.join([struct.pack(self._fmts[0], self._header_size, self._major_order, self._type, self._dimension,
                                     self._unit_size, self._space_id, self._space_id, self._attachment_offset,
                                     self._attachment_size),
                         struct.pack(self._fmts[1], self._reserve[0], self._reserve[1], self._reserve[2],
                                     self._reserve[3], self._reserve[4], self._reserve[5], self._reserve[6],
                                     self._reserve[7]),
                         struct.pack("s", json.dumps(self._attachment))])

    def unpack(self, buffer, offset=0):
        (self._header_size, self._major_order, self._type, self._dimension, self._unit_size, self._space_id,
         self._attachment_offset, self._attachment_size) = struct.unpack_from(self._fmts[0], buffer, offset)
        self._reserve = struct.unpack_from(self._fmts[1], buffer, offset + struct.calcsize(self._fmts[0]))
        if self._attachment_size:
            attachment = struct.unpack_from("%ds" % self._attachment_size, buffer, offset + self._attachment_offset)
            self._attachment = json.loads(attachment[0])

    def header_size(self):
        return self._header_size

    def major_order(self):
        return self._major_order

    def type(self):
        return self._type

    def dimension(self):
        return self._dimension

    def unit_size(self):
        return self._unit_size

    def space_id(self):
        return self._space_id

    def attachment_offset(self):
        return self._attachment_offset

    def attachment_size(self):
        return self._attachment_size

    def reserve(self):
        return self._reserve

    def vector_size(self):
        return self._unit_size * self._dimension


class FeatureTypes(IntEnum):
    # FT_UNDEFINED = 0
    # FT_INT64 = 0  # hack types, which used to load unsigned long long
    # FT_BINARY32 = 1
    # FT_BINARY64 = 2
    FT_FP16 = 3
    FT_FP32 = 4
    FT_FP64 = 5
    FT_INT8 = 6
    FT_INT16 = 7
    # FT_INT4 = 8


class ValueTypeHelper(object):
    """
        Reference to deps/proxima/include/aitheta2/index_meta.h
          enum FeatureTypes {
            FT_UNDEFINED = 0,
            FT_BINARY32 = 1,
            FT_BINARY64 = 2,
            FT_FP16 = 3,
            FT_FP32 = 4,
            FT_FP64 = 5,
            FT_INT8 = 6,
            FT_INT16 = 7,
            FT_INT4 = 8,
          };
        """
    fmt_table = '***efdbh*'
    default_value_table = [0, 0, 0, 0.0, 0.0, 0.0, 0, 0, 0]
    precision_table = [0, 0, 0, 3, 6, 10, 0, 0, 0]

    @classmethod
    def fmt(cls, value_type: FeatureTypes, counts: int = 1):
        return counts * cls.fmt_table[value_type]

    @classmethod
    def pack(cls, value_type: FeatureTypes, value) -> bytes:
        return struct.pack(cls.fmt(value_type), value)

    @classmethod
    def pack_values(cls, value_type: FeatureTypes, values):
        for value in values:
            yield cls.pack(value_type, value)

    @classmethod
    def pack_array(cls, value_type: FeatureTypes, array) -> bytes:
        return b''.join(cls.pack_values(value_type, array))

    @classmethod
    def default(cls, value_type):
        return cls.default_value_table[value_type]

    @classmethod
    def default_values(cls, value_type, counts):
        for i in range(counts):
            yield cls.default(value_type)

    @classmethod
    def default_array(cls, value_type, counts):
        return list(cls.default_values(value_type, counts))

    @classmethod
    def precision(cls, value_type):
        return cls.precision_table[value_type]


class VectorObject(StorageObject):
    def __init__(self, value_type: FeatureTypes, counts):
        StorageObject.__init__(self, ValueTypeHelper.fmt(value_type, counts))
        self._value_type = value_type
        self._counts = counts
        self._vector = ValueTypeHelper.default_array(value_type, counts)

    def pack(self):
        return ValueTypeHelper.pack_array(self._value_type, self._vector)

    def unpack(self, buffer, offset=0):
        self._vector = struct.unpack_from(self.fmt(), buffer, offset)
        precision = ValueTypeHelper.precision(self._value_type)
        if precision != 0:
            self._vector = [round(v, precision) for v in self._vector]

    def vector(self):
        return self._vector


class KeyObject(StorageObject):
    def __init__(self):
        StorageObject.__init__(self, 'Q')
        self._key = 0

    def pack(self):
        return struct.pack(self.fmt(), self._key)

    def unpack(self, buffer, offset=0):
        self._key = struct.unpack_from(self.fmt(), buffer, offset)

    def key(self):
        return self._key


class RandomBufferReader(object):
    def __init__(self):
        pass

    def size(self):
        return 0

    def read(self, offset, size):
        pass


class RandomMMapReader(RandomBufferReader):
    def __init__(self, vector_file):
        RandomBufferReader.__init__(self)
        self._fp = open(vector_file, 'r+b')
        self._mm = mmap(self._fp.fileno(), 0)

    def __del__(self):
        self._mm.close()
        self._fp.close()

    def size(self):
        return self._mm.size()

    def read(self, offset, size):
        if offset < 0 or size < 0 or offset + size > self._mm.size():
            raise IOError
        return self._mm[offset:offset + size]


class RandomFileReader(RandomBufferReader):
    def __init__(self, vector_file):
        RandomBufferReader.__init__(self)
        self._file = open(vector_file, 'rb')
        self._size = self.size()

    def __del__(self):
        self._file.close()

    def size(self):
        current = self._file.tell()
        self._file.seek(0, os.SEEK_END)
        count = self._file.tell()
        self._file.seek(current, os.SEEK_SET)
        return count

    def read(self, offset, size):
        if offset < 0 or size < 0 or offset + size > self._size:
            raise IOError
        self._file.seek(offset)
        return self._file.read(size)


class Proxima2VectorsReader(object):
    def __init__(self, buffer: RandomBufferReader):
        self._buffer = buffer
        self._header = None
        self._meta = None
        self._vectors_base = 0
        self._keys_base = 0
        self._keys_cache = ()
        self._cached_begin = 0

    def __del__(self):
        pass

    def header(self):
        return self._header

    def meta(self):
        return self._meta

    def num_vectors(self):
        return self._header.num_vectors()

    def _load_header(self) -> Optional[DatasetHeader]:
        header = DatasetHeader()
        if self._buffer.size() < header.calcsize():
            return None

        buf = self._buffer.read(0, header.calcsize())
        header.unpack(buf)
        return header

    def _load_meta(self) -> Optional[MetaHeader]:
        meta = MetaHeader()
        if self._header is None or self._buffer.size() < self._header.vectors_base():
            return None

        buf = self._buffer.read(self._header.calcsize(), self._header.meta_size())
        meta.unpack(buf)
        return meta

    def _vector_base(self, index):
        return self._vectors_base + index * self._meta.vector_size()

    def _key_base(self, index):
        return self._keys_base + index * 8

    def load(self):
        if not self._buffer:
            return False
        self._header = self._load_header()
        self._meta = self._load_meta()
        self._vectors_base = self._header.vectors_base()
        self._keys_base = self._vector_base(self._header.num_vectors())

    def unload(self):
        return True

    def is_valid(self):
        return self._header and self._meta and \
               self._buffer.size() == self._key_base(self._header.num_vectors())

    def vector(self, index):
        if index >= self._header.num_vectors():
            return None
        vec = VectorObject(self._meta.type(), self._meta.dimension())
        buf = self._buffer.read(self._vector_base(index), vec.calcsize())
        vec.unpack(buf)
        return vec.vector()

    def _load_keys(self, begin, counts):
        if begin + counts > self._header.num_vectors():
            return []

        key = KeyObject()
        buf = self._buffer.read(self._key_base(begin), counts * key.calcsize())
        return struct.unpack(counts * key.fmt(), buf)

    def _cache_range(self):
        return [self._cached_begin, self._cached_begin + len(self._keys_cache) - 1]

    def _in_cache(self, index):
        cached = self._cache_range()
        return cached[0] <= index <= cached[1]

    def _load_batch_keys(self, index):
        begin = int((index / 1024) * 1024)
        counts = 1024 if (begin + 1024) < self._header.num_vectors() else self._header.num_vectors() - begin
        self._keys_cache = self._load_keys(begin, counts)
        self._cached_begin = begin

    def key(self, index):
        if index >= self._header.num_vectors():
            return None

        if not self._in_cache(index):
            self._load_batch_keys(index)

        return self._keys_cache[index - self._cached_begin]


class Proxima2GTRecall(object):
    """
    Format: pk, score
    """
    pack_fmt = 'Lf'

    def __init__(self, pk=0, score=0.0):
        self.pk = pk
        self.score = score

    def __eq__(self, other):
        return self.equals(other)

    @classmethod
    def calcsize(cls):
        return struct.calcsize(Proxima2GTRecall.pack_fmt)

    def pack(self):
        return struct.pack(Proxima2GTRecall.pack_fmt, self.pk, self.score)

    def unpack(self, buf, offset=0):
        self.pk, self.score = struct.unpack_from(Proxima2GTRecall.pack_fmt, buf, offset)
        # self.score = round(self.score, 6)

    def is_same_pk(self, pk):
        return self.pk == pk

    def is_same_score(self, score):
        return math.isclose(self.score, score, 1e-06)

    def equals(self, recall):
        return self.is_same_score(recall.pk) and self.is_same_score(recall.score)


class CustomEncoder(json.JSONEncoder):
    def default(self, x):
        if isinstance(x, Proxima2GTRecall):
            return {'pk': x.pk, 'score': x.score}
        return super().default(self, x)


def _default_receiver(_):
    pass


class Proxima2GTRecord(object):
    """
    GTRecord: gt_count, [Proxima2GTRecall, ...]
    """
    pack_fmt = 'i'

    def __init__(self, count=0):
        self._count = count
        self._recalls = []

    def dumps(self):
        return {"count": self._count, "recalls": self._recalls}

    def calcsize(self):
        return struct.calcsize(Proxima2GTRecord.pack_fmt) + self._count * Proxima2GTRecall.calcsize()

    def pack(self):
        return struct.pack(Proxima2GTRecord.pack_fmt, self._count) + \
               b''.join([recall.pack() for recall in self.recalls])

    def unpack(self, buf, offset=0):
        self._count, = struct.unpack_from(Proxima2GTRecord.pack_fmt, buf, offset)
        offset += struct.calcsize(Proxima2GTRecord.pack_fmt)
        self._recalls = []
        for i in range(self._count):
            recall = Proxima2GTRecall()
            recall.unpack(buf, offset)
            offset += recall.calcsize()
            self._recalls.append(recall)

    def count(self):
        return self._count

    def record(self, pk):
        return self.find(pk)

    def recalls(self, end=sys.maxsize):
        end = min(end, self._count)
        for r in self._recalls[:end]:
            yield r

    def find(self, pk):
        try:
            f = filter(lambda record: record.pk == pk, self._recalls)
            return next(f)
        except StopIteration as e:
            return None

    def exists(self, pk):
        return self.find(pk) is not None

    def pk_set(self, end=sys.maxsize):
        end = min(end, len(self._recalls))
        return set([r.pk for r in self._recalls[:end]])

    def score_set(self, end=sys.maxsize):
        return set(self.score_list(end))

    def score_list(self, end=sys.maxsize):
        end = min(end, len(self._recalls))
        return [r.score for r in self._recalls[:end]]

    def append(self, record):
        self._recalls.append(record)
        self._count = len(self._recalls)

    def filter_pk(self, record, nums, receiver=_default_receiver):
        pks = record.pk_set(nums) & self.pk_set(nums)
        results = []
        for r in self.recalls(nums):
            if r.pk in pks:
                results.append(r)
            else:
                receiver(r)
        return results

    def filter_pk_not_in(self, record, nums, receiver=_default_receiver):
        pks = record.pk_set(nums) & self.pk_set(nums)
        results = []
        for r in self.recalls(nums):
            if r.pk not in pks:
                results.append(r)
            else:
                receiver(r)
        return results

    def _score_in_list(self, score, array):
        try:
            f = filter(lambda s: math.isclose(s, score, rel_tol=1e-05), array)
            next(f)
            return True
        except StopIteration as _:
            return False

    def _score_list_and(self, left, right):
        results = []
        for s in left:
            if self._score_in_list(s, right):
                results.append(s)
        return results

    def filter_score(self, record, nums, receiver=_default_receiver):
        score_set = record.score_set(nums) & self.score_set(nums)
        # score_set = set(self._score_list_and(self.score_list(), record.score_list()))
        results = []
        for r in self.recalls(nums):
            if r.score in score_set:
                results.append(r)
            else:
                receiver(r)
        return results

    def filter_score_not_in(self, record, nums, receiver=_default_receiver):
        score_set = record.score_set(nums) & self.score_set(nums)
        # score_set = set(self._score_list_and(self.score_list(), record.score_list()))
        results = []
        for r in self.recalls(nums):
            if r.score not in score_set:
                results.append(r)
            else:
                receiver(r)
        return results

    def __and__(self, other):
        return other.pk_set() and self.pk_set()

    def __or__(self, other):
        return other.pk_set() or self.pk_set()


class Proxima2GT(object):
    """
    Ground Truth file reader
    Format: [Proxima2GTRecord, ....]
    """

    def __init__(self, gt_counts, gt_file, skip_magic=True):
        self._skip_magic = skip_magic
        self._counts = gt_counts
        self._gt_file = gt_file
        self._records = []

    def __del__(self):
        self._records = []

    def load(self):
        record = Proxima2GTRecord(self._counts)
        stat = os.stat(self._gt_file)
        if stat.st_size == 0 or stat.st_size % record.calcsize() != 0:
            logging.error(f'Failed to check size of gt file, which should be multiple times of {record.calcsize()}')
            return False
        with open(self._gt_file, 'rb') as fin:
            while True:
                record = Proxima2GTRecord(self._counts)
                buf = fin.read(record.calcsize())
                if not buf:
                    break
                record.unpack(buf)
                self._records.append(record)
        return True

    def unload(self):
        self._records = []

    def records(self):
        for r in self._records:
            yield r

    def record(self, idx):
        if abs(idx) < len(self._records):
            return self._records[idx]
        return None

    def counts(self):
        return len(self._records)

    def append(self, record):
        self._records.append(record)

    def serialize(self):
        with open(self._gt_file, 'w+b') as out:
            for r in self.records():
                out.write(r.pack())


================================================
FILE: benchmark/common/proxima_be_query.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE query
#
import sys
import struct

from common.mysql_utils import MySQL


def _parse_int(string):
    return int(string)


def _parse_float(string):
    return float(string)


def _parse_none(_):
    return None


class QuerySet(object):
    def __init__(self):
        pass

    def init(self) -> bool:
        pass

    def cleanup(self) -> bool:
        pass

    def counts(self) -> int:
        pass

    def queries(self, start=0, end=sys.maxsize):
        pass

    def query(self, start=0, counts=1):
        pass


class MysqlRawQuerySet(QuerySet):
    def __init__(self, uri, table, collection):
        super().__init__()
        self._uri = uri
        self._conn = MySQL.connect(uri)
        self._table = table
        self._collection = collection

    def __del__(self):
        MySQL.close(self._conn)

    def _columns(self):
        return [c.name for c in self._collection.collection_config.index_column_params]

    def counts(self) -> int:
        return MySQL.counts(self._conn, self._table)

    def queries(self, start=0, end=sys.maxsize):
        end = min(end, self.counts())
        columns = self._columns()
        if len(columns) != 1 or end <= 0:
            return []
        with self._conn.cursor() as cursor:
            result = MySQL.execute(
                cursor,
                f'select {",".join(columns)} from {self._table} where id >= {start} and id < {end + 1}')
            for query in result:
                yield query

    def query(self, start=0, counts=1):
        columns = self._columns()
        with self._conn.cursor() as cursor:
            return MySQL.execute(cursor,
                                 f'select {",".join(columns)} from {self._table} where id >= {start} limit {counts}')


class MysqlRawQuerySetCache(MysqlRawQuerySet):
    def __init__(self, uri, table, collection):
        super().__init__(uri, table, collection)
        self._queries = []
        self._use_binary = True
        self._dimension = None

    def __len__(self):
        return len(self._queries)

    def __getitem__(self, item):
        assert isinstance(item, int) and item < len(self._queries)
        return self._queries[item]

    def counts(self) -> int:
        if len(self._queries) == 0:
            return super().counts()
        return len(self._queries)

    def init(self) -> bool:
        for query in super().queries():
            query = list(map(float, query[0].split(",")))
            self._dimension = len(query)
            if self._use_binary:
                qlen = len(query)
                query = struct.pack(f'<{qlen}f', *query)
            self._queries.append(query)
        return True

    def cleanup(self) -> bool:
        self._queries = []

    def queries(self, start=0, end=sys.maxsize):
        for idx in range(start, end):
            yield self._queries[idx]

    def query(self, start=0, counts=1):
        if counts == 1 and start < len(self._queries):
            return self._queries[start]
        return self._queries[start: start+counts]

    def dimension(self):
        return self._dimension


================================================
FILE: benchmark/common/proxima_be_repo.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE Repository source
#
from common.mysql_utils import MySQL


class ProximaSERepoSource(object):
    def __init__(self, jdbc):
        self._jdbc = jdbc

    def __del__(self):
        pass

    def jdbc_str(self):
        return self._jdbc

    def is_valid(self) -> bool:
        pass

    def tables(self):
        pass

    def schema(self, table):
        pass

    def counts(self, table):
        pass


class MysqlRepoSource(ProximaSERepoSource):
    def __init__(self, jdbc, table):
        ProximaSERepoSource.__init__(self, jdbc)
        self._table = table
        self._with_conn = None
        self._conn = MySQL.connect(self._jdbc)

    def __del__(self):
        pass

    def __enter__(self):
        if self._with_conn:
            self._with_conn = MySQL.connect(self._jdbc)
        return self._with_conn

    def __exit__(self, exc_type, exc_val, exc_tb):
        if self._with_conn:
            self._with_conn.close()
        self._with_conn = None

    def is_valid(self) -> bool:
        return True if self._conn and len(self.schema(self._table)) != 0 else False

    def tables(self):
        return MySQL.tables(self._conn)

    def schema(self, table=None):
        table = self._table if not table else table
        return MySQL.schema(self._conn, table)

    def counts(self, table=None):
        table = self._table if not table else table
        return MySQL.counts(self._conn, table)


================================================
FILE: benchmark/common/proxima_be_service.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima Service management module
#
import http
import os
import re
import logging
import signal
import tempfile
import threading
import time
from enum import IntEnum

from google.protobuf.text_format import MessageToString, PrintMessage, Parse

from .runner import ShellRunner

from pyproximase.proto import config_pb2

GRPC_PORT = 16000
HTTP_PORT = 16100


class ServiceListener(object):
    def on_failed(self, name) -> bool:
        logging.info(f'Service({name}) failed!!')
        return True

    def on_finished(self, name) -> bool:
        logging.info(f'Service({name}) finished!!')
        return True


class ServiceStatus(IntEnum):
    INITIALIZED = 0
    RUNNING = 1
    FAILED = 2
    FINISHED = 3
    UNINITIALIZED = 4


class ProximaSEService(object):
    def __init__(self, service_name, working_dir, listener):
        self._service_name = service_name
        self._working_dir = working_dir
        self._listener = listener

    def __del__(self):
        pass

    @staticmethod
    def write_config_file(config_file, config):
        with open(config_file, 'w+') as out:
            PrintMessage(config, out)
            logging.info("Write config(%s): \n%s" % (config_file, MessageToString(config)))

    @staticmethod
    def write_file(config_file, config):
        with open(config_file, 'w+') as out:
            out.write(config)

    class Stats(object):
        def __init__(self, cpu=0, memory=0):
            self._cpu = cpu
            self._memory = memory

        def cpu(self):
            return round(self._cpu, 2)

        def memory_in_bytes(self):
            return self._memory

        def memory_in_kb(self):
            return round(float(self._memory) / 1024, 2)

        def memory_in_mb(self):
            return round(self.memory_in_kb() / 1024, 2)

        def memory_in_gb(self):
            return round(self.memory_in_mb() / 1024, 2)

    def service_name(self):
        return self._service_name

    def working_dir(self):
        return self._working_dir

    def listener(self):
        return self._listener

    def init(self) -> bool:
        pass

    def cleanup(self) -> bool:
        pass

    def start(self) -> bool:
        pass

    def stop(self) -> bool:
        pass

    def stdout_log(self) -> str:
        pass

    def stderr_log(self) -> str:
        pass

    def status(self) -> ServiceStatus:
        pass

    def service_addr(self) -> str:
        pass

    def stats(self) -> Stats:
        pass


class LogHandler(object):
    def on_stdin(self, msg):
        pass

    def on_stderr(self, msg):
        pass


class LoggingMonitor(threading.Thread):
    def __init__(self, process, handler, interval=0.01):
        """
        @param interval: sleep seconds between dump log
        """
        threading.Thread.__init__(self)
        self._process = process
        self._handler = handler
        self._interval = interval
        self._stopped = True

    def run(self):
        self._stopped = False
        while not self._stopped:
            if self._process.poll():  # sub process finished
                break

            if ShellRunner.readable(self._process.stdout):
                self._handler.on_stdin(self._process.stdout.read())
            elif ShellRunner.readable(self._process.stderr):
                self._handler.on_stderr(self._process.stderr.read())
            else:
                time.sleep(self._interval)

    def stop(self):
        self._stopped = True


class ProximaSEBaseService(ProximaSEService, LogHandler):
    def __init__(self, service_name, binary, config, working_dir, listener, cleanup_logs):
        ProximaSEService.__init__(self, service_name, working_dir, listener)
        self._binary = binary
        self._config = config
        self._log = self.stdout_log()
        self._stdout_fd = None
        self._process = None
        self._log_monitor = None
        self._cleanup_logs = cleanup_logs

    def __del__(self):
        self.cleanup()
        self._process = None

    def init(self) -> bool:
        if self._process:
            logging.info(f'Service({self.service_name()}) have been initialized')
            return True

        if not os.path.isdir(self.working_dir()) or os.path.isfile(self._log):
            logging.error(f'Working directory({self.working_dir()}) does not exist or log file({self._log}) exists')
            return False

        if not os.path.isfile(self._binary) or not os.path.isfile(self._config):
            logging.error(
                f'Service({self.service_name()}) binary({self._binary}) or config({self._config}) do not exist')
            return False

        return True

    @staticmethod
    def _remove_log(log):
        if log and os.path.isfile(log):
            os.remove(log)

    def cleanup(self) -> bool:
        if self._process:
            self.stop()
        if self._cleanup_logs:
            self._remove_log(self.stdout_log())
            self._remove_log(self.stderr_log())
        return True

    def start(self) -> bool:
        return False

    def stop(self) -> bool:
        logging.info(f'Stop {self.service_name()} process')
        # Stop sub process
        if self._process and not self._process.poll():
            self._process.terminate()
            self._process.wait()
            # Replaced by signal user2
            # self._process.send_signal(signal.SIGUSR2)
            # code = self._process.poll()
            # if not code:
            #     self._process.terminate()
            #     self._process.wait()

        # Stop logging thread
        if self._log_monitor:
            self._log_monitor.stop()
            self._log_monitor.join()
            self._log_monitor = None

        # CLose log file
        if self._stdout_fd:
            self._stdout_fd.close()
            self._stdout_fd = None
        return True

    def running(self):
        return self.status() == ServiceStatus.RUNNING

    def status(self) -> ServiceStatus:
        if self._process:
            code = self._process.poll()
            if not code:
                return ServiceStatus.RUNNING
            elif code in [0, 1, signal.SIGTERM, signal.SIGUSR2]:
                return ServiceStatus.FINISHED
            logging.info(f'{self.service_name()} returned with code: {code}')
            return ServiceStatus.FAILED

        return ServiceStatus.UNINITIALIZED

    def service_addr(self) -> str:
        return ''

    def _write_log(self, msg):
        if self._stdout_fd and msg:
            self._stdout_fd.write(msg)

    def on_stdin(self, msg):
        self._write_log(msg)

    def on_stderr(self, msg):
        self._write_log(msg)

    def stats(self) -> ProximaSEService.Stats:
        return ProximaSEService.Stats()


def _read_int_value(key, default, **kwargs):
    return int(kwargs[key]) if key in kwargs else default


def _read_str_value(key, default, **kwargs):
    return kwargs[key] if key in kwargs else default


class ProximaSEMysqlRepo(ProximaSEBaseService):
    def __init__(self, binary, config, working_dir, listener=ServiceListener(), cleanup_logs=False):
        ProximaSEBaseService.__init__(self, "ProximaSE MYSQL Repository", binary, config, working_dir, listener,
                                      cleanup_logs)

    @staticmethod
    def build_config(**kwargs):
        log_directory = _read_str_value("log_directory", "log", **kwargs)
        index_agent_addr = _read_str_value("index_agent_addr", None, **kwargs)
        if not index_agent_addr:
            listen_port = _read_int_value("index_port", GRPC_PORT, **kwargs)
            index_agent_addr = f'127.0.0.1:{listen_port}'

        repository_name = _read_str_value("repository_name", None, **kwargs)
        return """common_config {
            log_directory: "%s"
            log_file: "mysql_repo.log"
        }
        repository_config {
            index_agent_addr: "%s"
            repository_name: "%s"
        }""" % (log_directory, index_agent_addr, repository_name)

    @staticmethod
    def build_config_file(config_file, **kwargs):
        config = ProximaSEMysqlRepo.build_config(**kwargs)
        ProximaSEService.write_file(config_file, config)

    def start(self) -> bool:
        if self.running():
            logging.warning(f'{self.service_name()} have been started, please call stop first')
            return False

        logging.info(f'Start {self.service_name()} process')
        # Start Service as sub process
        self._process = ShellRunner.aync_execute([self._binary, '--config', self._config])
        self._stdout_fd = open(self._log, 'w+b')
        # Redirect log of Service
        self._log_monitor = LoggingMonitor(self._process, self)
        self._log_monitor.start()
        return True

    def stdout_log(self) -> str:
        return os.path.join(self.working_dir(), "mysql.repo.log") if self.working_dir() else None

    def stderr_log(self) -> str:
        return ''

    def on_stdin(self, msg):
        ProximaSEBaseService.on_stdin(self, msg)

    def on_stderr(self, msg):
        ProximaSEBaseService.on_stderr(self, msg)


class ProximaSEBVarService(object):
    @staticmethod
    def process_stat(address) -> ProximaSEService.Stats:
        try:
            conn = http.client.HTTPConnection(address)
            conn.request("GET", "/vars/process_cpu_usage,system_core_count,process_memory_resident")
            resp = conn.getresponse().read().decode('UTF-8')
            conn.close()
            match = re.match(
                r"process_cpu_usage : (.*)\r\nprocess_memory_resident : (.*)\r\nsystem_core_count : (.*)\r\n", resp,
                re.M | re.I)
            return ProximaSEService.Stats(float(match.group(1)) * int(match.group(3)), int(match.group(2)))
        except Exception as e:
            logging.error(e)
        return ProximaSEService.Stats()

    @staticmethod
    def api_status(address):
        try:
            conn = http.client.HTTPConnection(address)
            conn.request("GET", "/status")
            resp = conn.getresponse().read().decode('UTF-8')
            conn.close()
            return resp
        except Exception as e:
            logging.error(e)
        return ""


class ProximaSE(ProximaSEBaseService):
    def __init__(self, binary, config, working_dir, listener=ServiceListener(), cleanup_logs=False):
        ProximaSEBaseService.__init__(self, "ProximaSE", binary, config, working_dir, listener, cleanup_logs)
        self._stderr_fd = None
        pass

    @staticmethod
    def build_meta_file(meta_file=None):
        temp_file = tempfile.mktemp(suffix=".sqlite") if not meta_file else meta_file
        return f'sqlite://{temp_file}'

    @staticmethod
    def build_config(**kwargs):
        config = config_pb2.ProximaSEConfig()
        # Common Config
        config.common_config.log_directory = _read_str_value("log_directory", "log", **kwargs)
        config.common_config.grpc_listen_port = _read_int_value("grpc_port", GRPC_PORT, **kwargs)
        config.common_config.http_listen_port = _read_int_value("http_port", HTTP_PORT, **kwargs)
        # Index Config
        config.index_config.build_thread_count = _read_int_value("index_build_threads", 10, **kwargs)
        config.index_config.dump_thread_count = _read_int_value("index_dump_threads", 5, **kwargs)
        config.index_config.max_build_qps = _read_int_value("index_build_qps", 1000000, **kwargs)
        config.index_config.index_directory = _read_str_value("index_directory", "indices", **kwargs)
        # Meta Config
        config.meta_config.meta_uri = _read_str_value("meta_uri", ProximaSE.build_meta_file(), **kwargs)
        return config

    @staticmethod
    def build_config_file(config_file, **kwargs):
        config = ProximaSE.build_config(**kwargs)
        ProximaSEService.write_config_file(config_file, config)

    def stdout_log(self) -> str:
        return os.path.join(self.working_dir(), "proxima_se_stdout.log") if self.working_dir() else None

    def stderr_log(self) -> str:
        return os.path.join(self.working_dir(), "proxima_se_stderr.log") if self.working_dir() else None

    def start(self) -> bool:
        if self.running():
            logging.warning(f'{self.service_name()} have been started, please call stop first')
            return False

        logging.info(f'Start {self.service_name()} process')
        # Start ProximaSE as sub process
        self._process = ShellRunner.aync_execute([self._binary, '--config', self._config])
        self._stdout_fd = open(self.stdout_log(), 'w+b')
        self._stderr_fd = open(self.stderr_log(), 'w+b')

        # Redirect log of Mysql Repo
        self._log_monitor = LoggingMonitor(self._process, self)
        self._log_monitor.start()
        return True

    def stop(self) -> bool:
        code = ProximaSEBaseService.stop(self)
        if code and self._stderr_fd:
            self._stderr_fd.close()
            self._stderr_fd = None
        return code

    def on_stderr(self, msg):
        if self._stderr_fd and msg:
            self._stderr_fd.write(msg)

    def service_addr(self) -> str:
        config = config_pb2.ProximaSEConfig()
        with open(self._config, 'r') as config_fd:
            text = config_fd.read()
            Parse(text, config, allow_unknown_field=True)
        return f'127.0.0.1:{config.common_config.grpc_listen_port}'

    def stats(self) -> ProximaSEService.Stats:
        return ProximaSEBVarService.process_stat(self.service_addr())


================================================
FILE: benchmark/common/runner.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Shell command runner
#

import os
import subprocess
import time
import select
from .exceptions import FileNotExits


class ShellRunner(object):
    @staticmethod
    def read_output(fd):
        out = fd.read()
        if len(out) == 0:
            out = None
        return out

    @staticmethod
    def readable(fd):
        res = select.select([fd], [], [], 1)
        if res == ([fd], [], []):
            return True
        return False

    @staticmethod
    def aync_execute(args):
        return subprocess.Popen(args,
                                stdin=subprocess.PIPE,
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE,
                                shell=False)

    @staticmethod
    def execute2(args):
        p = subprocess.Popen(args,
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE,
                             shell=False)
        str = ""
        for line in p.stdout:
            str += line.decode("utf-8")
        p.wait()
        return p.returncode, str

    @staticmethod
    def execute(args, timeout=10):
        st = int(time.time())
        out = ''
        err = ''
        p = subprocess.Popen(args,
                             stdin=subprocess.PIPE,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE,
                             shell=False)

        code = 0
        ct = int(time.time())
        while ct - st < timeout:
            p.poll()
            if p.returncode:
                code = p.returncode
                break

            if ShellRunner.readable(p.stdout):
                out += p.stdout.read()
            if ShellRunner.readable(p.stderr):
                err += p.stderr.read()

            time.sleep(0.2)
            ct = int(time.time())
        if ct - st >= timeout and not p.returncode:
            code = 0
            p.terminate()

        if ShellRunner.readable(p.stdout):
            out += p.stdout.read()
        if ShellRunner.readable(p.stderr):
            err += p.stderr.read()

        return code, out, err


class ShellCommand(object):
    def __init__(self, cmd):
        if not os.path.isfile(cmd):
            raise FileNotExits(cmd)
        self.cmd = cmd

    def execute(self, *args):
        return ShellRunner.execute([self.cmd] + args)

    def execute2(self, *args):
        return ShellRunner.execute2([self.cmd] + args)


================================================
FILE: benchmark/requirements.txt
================================================
grpcio==1.34.0
grpcio-tools==1.34.0
protobuf==3.14.0
# PyMySQL~=1.0.2
# pyproximabe~=0.1


================================================
FILE: benchmark/scripts/build_bench.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE benchmark toolkits
#
from datetime import datetime
import json
import shutil
import sys
import logging
from concurrent.futures import as_completed
from concurrent.futures.thread import ThreadPoolExecutor
from optparse import OptionParser
from urllib.parse import urlparse

from google.protobuf.json_format import MessageToDict

from pyproximase import Client as SEClient
from pyproximase import *

from common.proxima_se_repo import MysqlRepoSource
from common.proxima_se_service import *

from urllib import parse

"""
Requirements:
    1. Above Python3.6
Test Scenario:
------
Step 1: Prepared Repository for ProximaSE
        Requirements:
          i: table should have first column named by id with property auto_increment
         ii: vector column should be prefixed by vector
        iii: all columns treated as forward attributes except vector and id
Step 2: Clone source code of ProximaSE
        cd (source of ProximaSE)
Step 3: Build ProximaSE
        mkdir build; cd build; cmake ../; make -j
Step 4: Run Bench tools
        cd benchmark; pip install -r requirements.txt; PYTHONPATH=$(pwd) python scripts/build_bench.py
------
"""


class BenchContext(object):
    def __init__(self, output_dir, kwargs):
        self._output = os.path.realpath(output_dir)
        self._kwargs = kwargs

        self._log_dir = kwargs.log_dir if kwargs.log_dir else os.path.join(self._output, 'logs')
        self._indices_dir = kwargs.index_directory if kwargs.index_directory else os.path.join(
            self._output, 'indices')

        self._meta_uri = kwargs.meta_uri
        self._meta_dir = None
        if self._meta_uri:
            uri = urlparse(self._meta_uri)
            if uri and uri.scheme.lower() == 'sqlite' and uri.path:
                self._meta_dir = os.path.dirname(uri.path)
                if self._meta_dir == "/":
                    logging.error("Can't create meta to root directory '/'")
                    self._meta_dir = None
        else:
            self._meta_dir = os.path.join(self._output, 'meta')
            self._meta_uri = f'sqlite://{self._meta_dir}/meta.sqlite'

        self._repository = None
        self._table = kwargs.table

        self._dimension = int(kwargs.dimension)

        if kwargs.jdbc:
            path = urlparse(kwargs.jdbc).path
            if path and len(path) != 0:
                self._repository = path.strip("/").rstrip("/")

        self._proxima_se_conf = None
        self._repository_conf = None
        self._report = None

    def output(self):
        return self._output

    def options(self):
        return self._kwargs

    def repository(self):
        return self._repository

    def table(self):
        return self._table

    def counts(self):
        return int(self._kwargs.counts) if self._kwargs.counts else sys.maxsize

    def meta_dir(self):
        return self._meta_dir

    def indices_dir(self):
        return self._indices_dir

    def log_dir(self):
        return self._log_dir

    def proxima_se_log_dir(self):
        return os.path.join(self.log_dir(), "be")

    def repository_log_dir(self):
        return os.path.join(self.log_dir(), "repo")

    def timeout_in_seconds(self):
        return int(self._kwargs.timeout)

    def output_flush_interval(self):
        return float(self._kwargs.interval)

    def config_dir(self):
        return os.path.join(self._output, "conf")

    def proxima_se_config(self):
        if self._proxima_se_conf:
            return MessageToDict(self._proxima_se_conf)
        return {}

    def repository_config(self):
        return self._repository

    def proxima_se_config_file(self):
        return os.path.join(self.config_dir(), 'proxima_se.conf')

    def proxima_se_repo_config_file(self):
        return os.path.join(self.config_dir(), 'mysql_repo.conf')

    def proxima_se_admin_address(self):
        return ['127.0.0.1', self._proxima_se_conf.common_config.grpc_listen_port]

    def max_docs_per_segment(self):
        return int(self._kwargs.max_docs_per_segment)

    def dimension(self):
        return self._dimension

    def report_file(self):
        return self._report

    def _init_bench_config(self):
        self._proxima_se_conf = ProximaSE.build_config(log_directory=self.proxima_se_log_dir(),
                                                       grpc_port=int(self._kwargs.grpc_port),
                                                       http_port=int(self._kwargs.http_port),
                                                       index_build_threads=int(self._kwargs.index_build_threads),
                                                       index_build_qps=int(self._kwargs.index_build_qps),
                                                       index_directory=self.indices_dir(),
                                                       meta_uri=self._meta_uri)

        self._repository_conf = ProximaSEMysqlRepo.build_config(log_directory=self.repository_log_dir(),
                                                                index_port=int(self._kwargs.grpc_port),
                                                                repository_name=self._repository)
        if self._proxima_se_conf and self._repository_conf:
            ProximaSEService.write_config_file(self.proxima_se_config_file(), self._proxima_se_conf)
            ProximaSEService.write_file(self.proxima_se_repo_config_file(), self._repository_conf)
            return True
        return False

    @staticmethod
    def _create_directory(directory):
        if not os.path.exists(directory):
            os.makedirs(directory)

    def _init_output_dir(self):
        self._create_directory(self.output())
        if not self.meta_dir():
            return False
        logging.info(f'Create meta directory {self.meta_dir()}')
        self._create_directory(self.meta_dir())
        logging.info(f'Create indices directory {self.indices_dir()}')
        self._create_directory(self.indices_dir())
        logging.info(f'Create log directory {self.log_dir()}')
        self._create_directory(self.log_dir())
        self._create_directory(self.proxima_se_log_dir())
        self._create_directory(self.repository_log_dir())
        logging.info(f'Create config directory {self.config_dir()}')
        self._create_directory(self.config_dir())
        return True

    def _init_report(self):
        if self._kwargs.report:
            if os.path.exists(os.path.dirname(os.path.realpath(self._kwargs.report))):
                self._report = self._kwargs.report
            else:
                logging.error(f'Can not write report file: {self._kwargs.report}')
                return False
        else:
            self._report = os.path.join(self.output(), 'report.json')
        return True

    def init(self):
        if not self._init_report():
            return False

        if not self._init_output_dir():
            logging.error(f'Initialize output directory({self.output()}) failed')
            return False

        if not self._init_bench_config():
            logging.error(f'Can not create bench configs')
            return False
        return True

    @staticmethod
    def _cleanup_dir(directory):
        if os.path.isdir(directory):
            shutil.rmtree(directory)

    def cleanup(self):
        if self._kwargs.cleanup:
            self._cleanup_dir(self.output())
            self._cleanup_dir(self.meta_dir())
            self._cleanup_dir(self.indices_dir())
            self._cleanup_dir(self.log_dir())
            self._cleanup_dir(self.config_dir())

        return True


class ProximaSEBuilds(object):
    def __init__(self, roots):
        if not roots:
            roots = os.getenv("PROXIMA_SE_BUILD_ROOT")
            if not roots:
                roots = os.path.realpath(os.path.join(os.getcwd(), "..", "build"))
                if not os.path.isdir(roots):
                    roots = os.path.realpath(os.path.join(os.getcwd(), "..", "cmake-build-debug"))
        self._build_roots = roots
        logging.info(f'Locate Build Root of ProximaSE: {roots}')

    def proxima_se_binary(self):
        return os.path.join(self._build_roots, 'bin', 'proxima_se')

    def proxima_repo_binary(self):
        return os.path.join(self._build_roots, 'bin', 'mysql_repository')

    def is_valid(self):
        return os.path.isdir(self._build_roots) and os.path.isfile(self.proxima_se_binary()) and \
               os.path.isfile(self.proxima_repo_binary())


def _timeout_monitor(stopped, timeout, interval):
    logging.info(f'Timeout monitor started, sleep for {timeout} seconds')
    slept = 0
    while not stopped() and slept < timeout:
        time.sleep(interval)
        slept += interval

    logging.info(f'Timeout monitor stopped')
    if slept < timeout:
        return {}
    else:
        return {"timeout": True}


def _service_stopped_monitor(stopped, interval, *args):
    logging.info(f'Service monitor started, interval({interval})')
    while not stopped():
        services = map(lambda svc: svc.service_name(), filter(lambda svc: not svc.running(), args))
        for service in services:
            logging.info(f'{service} is not running')
            return {"stopped": service}
        time.sleep(interval)
    logging.info(f'Service monitor stopped')
    return {}


def _progress_monitor(stopped, callback, total, interval, notifier):
    logging.info(f'Start progress monitor, total({total})')
    start = time.monotonic()
    progress = 0.0
    last = [0, 0.0]
    processed = 0
    while not stopped():
        processed = callback()
        if processed < 0:
            processed = 0
            logging.info("Can't get processed from callback")
            break
        progress = round(float(processed) / total * 100, 4)
        seconds = time.monotonic() - start
        incremental = [processed - last[0], seconds - last[1]]
        last = [processed, seconds]
        if progress > 100.00:
            progress = 100.00
        print("Processed: %02.2f%%, QPS %d/S, RTQPS %d/S" % (
            progress, int(processed / seconds), int(incremental[0] / incremental[1])))
        notifier(progress, int(processed / seconds), round(seconds, 2), int(incremental[0] / incremental[1]))
        if processed >= total:
            print("Processed: 100%%, QPS %d/S, RTQPS %d/S" % (
                int(processed / seconds), int(incremental[0] / incremental[1])))
            notifier(100.00, int(processed / seconds), round(seconds, 2), int(incremental[0] / incremental[1]))
            progress = 100.00
            break
        else:
            time.sleep(interval)
    seconds = time.monotonic() - start
    logging.info("Progress monitor finished")
    return {"total": processed, "progress": progress, "seconds": int(seconds), 'qps': int(processed / seconds)}


class ProximaSEBuildBench(object):
    _filter_columns = ('id', 'vector')

    def __init__(self, output_dir, arg_options):
        self._builds = ProximaSEBuilds(arg_options.build_root)
        self._context = BenchContext(output_dir, arg_options)

        self._source = None
        self._repository = None
        self._proxima_se = None
        self._client = None
        self._last_progress = -1.0
        self._summary = {"report": self._context.output(),
                         "progress_header": ['Progress', 'QPS(AVG)', 'Seconds', 'QPS(RT)', 'IndexSize', 'CPU',
                                             'MEM(GB)', 'Time'],
                         "progress_table": []}
        self._pool = ThreadPoolExecutor(max_workers=5, thread_name_prefix='BenchMonitors')
        self._futures = []

    @staticmethod
    def human_number(num):
        if num > 1000000000:
            return f'{round(float(num) / 1000000000, 2)}B'
        elif num > 1000000:
            return f'{round(float(num) / 1000000, 2)}M'
        elif num > 1000:
            return f'{round(float(num) / 1000, 2)}T'
        return str(num)

    @staticmethod
    def summary_report(progress, report_file):
        try:
            with open(report_file, 'r') as report_fd:
                report = json.load(report_fd)
                threads = report['config']['proxima_se']['indexConfig']['buildThreadCount']
                print("Threads", "Total", *report['progress_header'])
                for idx in progress:
                    if 0 <= idx < len(report['progress_table']):
                        print(threads,
                              ProximaSEBuildBench.human_number(
                                  int(report['total'] / 100 * report['progress_table'][idx][0])),
                              *report['progress_table'][idx])
                    else:
                        break
        except Exception as e:
            logging.error(e)

    @staticmethod
    def summary_reports(progress, interval, *reports):
        if interval != 0:
            items = [int(i) for i in range(0, 10000, interval)]
        elif progress:
            items = [int(p) for p in progress.split(',')]
        else:
            logging.error("Failed to get interested progress")
            return

        for report in reports:
            ProximaSEBuildBench.summary_report(items, report)

    def init(self):
        if not self._builds.is_valid():
            logging.error("Proxima SE build is invalid, lost binary of proxima_se or mysql_repository")
            return False
        if not self._context.init():
            logging.error("Init bench context failed")
            return False

        self._source = MysqlRepoSource(self._context.options().jdbc, self._context.options().table)
        if not self._source.is_valid():
            logging.error(
                f'Can not init repository with jdbc: {self._context.options().jdbc}, '
                f'table: {self._context.options().table}')
            return False

        self._repository = ProximaSEMysqlRepo(self._builds.proxima_repo_binary(),
                                              self._context.proxima_se_repo_config_file(),
                                              self._context.log_dir())

        self._proxima_se = ProximaSE(self._builds.proxima_se_binary(),
                                     self._context.proxima_se_config_file(),
                                     self._context.log_dir())

        self._host, self._port = self._context.proxima_se_admin_address()

        return self._repository.init() and self._proxima_se.init()

    def cleanup(self):
        if self._proxima_se:
            self._proxima_se.cleanup()
        if self._repository:
            self._repository.cleanup()
        if self._context:
            self._context.cleanup()
        return True

    def _max_lsn(self):
        try:
            status, collection = self._client.describe_collection(self._context.table())
            if not status.ok():
                print(status)
                return -1
            logging.debug(collection)
            return collection.latest_lsn_context.lsn
        except Exception as e:
            logging.error("BRPC Exception")
            logging.error(e)
        return -1

    def _collection_docs(self):
        status, stats = self._client.stats_collection(self._context.table())
        if status.ok():
            return stats.total_doc_count
        else:
            logging.debug(status)
        return -1

    def _collection_index_size(self):
        status, stats = self._client.stats_collection(self._context.table())
        if status.ok():
            return stats.total_index_file_size
        else:
            logging.debug(status)
        return -1

    def _report_progress(self, progress, qps, seconds, rtqps):
        if progress >= 100 or progress - self._last_progress > 0.1:
            stats = self._proxima_se.stats()
            # noinspection PyTypeChecker
            self._summary['progress_table'].append(
                [progress, qps, seconds, rtqps, self._collection_index_size(), stats.cpu(), stats.memory_in_gb(),
                 datetime.now().strftime("%Y%m%d_%H:%M:%S")])
            self._last_progress = progress

    def _start_monitors(self):
        total = min(self._source.counts(), self._context.counts())
        return [self._pool.submit(_timeout_monitor, lambda: self.has_monitor_finished(),
                                  self._context.timeout_in_seconds(), 5),
                self._pool.submit(_service_stopped_monitor, lambda: self.has_monitor_finished(), 1,
                                  self._repository, self._proxima_se),
                self._pool.submit(_progress_monitor, lambda: self.has_monitor_finished(),
                                  lambda: self._collection_docs(), total, self._context.output_flush_interval(),
                                  lambda progress, qps, seconds, rtqps: self._report_progress(progress, qps, seconds,
                                                                                              rtqps))]

    def start(self):
        if self._proxima_se.start():
            time.sleep(10)
            self._client = SEClient(host=self._host, port=self._port)
            self.sync_schema()
            time.sleep(1)
            if self._repository.start():
                self._futures = self._start_monitors()
                return True
        return False

    def stop(self):
        for done in as_completed(self._futures):
            self._summary.update(done.result())
        self._pool.shutdown()
        return self._proxima_se.stop() and self._repository.stop()

    def _valid_schema(self):
        schema = self._source.schema()
        columns = [field[0] for field in schema]
        try:
            columns.index("id")
            columns.index("vector")
        except ValueError:
            return False
        return True

    def _build_repository_config(self):
        o = parse.urlparse(self._source.jdbc_str())
        return DatabaseRepository(self._context.repository(), self._source.jdbc_str(),
                                  self._context.table(), o.username, o.password)

    def _build_forward_metas(self, schema):
        forwards = filter(lambda field: not field[0] in self._filter_columns, schema)
        return [field[0] for field in forwards]

    def _build_column_metas(self):
        # Init column meta
        return [IndexColumnParam(self._filter_columns[1], self._context.dimension())]

    def _build_collection_meta(self, schema):
        # Init collection meta
        return CollectionConfig(self._context.table(),
                                self._build_column_metas(),
                                self._build_forward_metas(schema),
                                self._build_repository_config(),
                                self._context.max_docs_per_segment())

    def sync_schema(self):
        if self._proxima_se.running() and self._valid_schema():
            meta = self._build_collection_meta(self._source.schema())
            status = self._client.create_collection(meta)
            assert status.ok()
            _, collection = self._client.describe_collection(meta.collection_name)
            self._summary['collection'] = str(collection)
            return True
        else:
            logging.error("Can't sync table to ProximaSE")
        return False

    def has_monitor_finished(self):
        logging.debug("Enter")
        for _ in filter(lambda future: future.done() or future.cancelled(), self._futures):
            return True
        logging.debug("Exist")
        return False

    def wait_finish(self):
        logging.debug("Enter")
        for _ in as_completed(self._futures):
            # self._summary.update(done.result())
            break
        logging.debug("Exist")
        return True

    def summary(self):
        temp = self._summary
        temp['config'] = {'proxima_se': self._context.proxima_se_config(),
                          'repository': self._context.repository_config()}
        return temp

    def output_report(self):
        with open(self._context.report_file(), 'w+') as out:
            json.dump(self.summary(), out, indent=4)


def opt_parser():
    arg_parser = OptionParser()
    arg_parser.add_option('--build_root', dest='build_root', default=None,
                          help="The build directory of ProximaSE, default value: [ENV variable PROXIMA_SE_BUILD_ROOT "
                               "or '$(pwd)/../build']")
    arg_parser.add_option('--repo', dest='jdbc', default=None,
                          help='The source of repository, represented by jdbc string')
    arg_parser.add_option('-t', '--table', dest='table', default=None, help='Target table sync to ProximaSE')
    arg_parser.add_option('--counts', dest='counts', default=None,
                          help='The number of records will be sync to ProximaSE')
    arg_parser.add_option('--log_dir', dest='log_dir', default=None, help='Log directory, default is logs')
    arg_parser.add_option('--grpc_port', dest='grpc_port', default=GRPC_PORT,
                          help=f'Proxima SE GRPC service port, default {GRPC_PORT}')
    arg_parser.add_option('--http_port', dest='http_port', default=HTTP_PORT,
                          help=f'Proxima SE GRPC service port, default {HTTP_PORT}')
    arg_parser.add_option('--index_build_threads', dest='index_build_threads', default=10,
                          help='Index Agent build threads count, default is 10')
    arg_parser.add_option('--index_build_qps', dest='index_build_qps', default=1000000,
                          help='Threshold QPS of incremental records, default 1000000')
    arg_parser.add_option('--index_directory', dest='index_directory', default=None,
                          help="Index directory, where indices located, default is 'indices'")
    arg_parser.add_option('--max_docs_per_segment', dest='max_docs_per_segment', default=1000000,
                          help='Max records per segment, default 1000000')
    arg_parser.add_option('--dimension', dest='dimension', default=512,
                          help='Dimension of vector')
    arg_parser.add_option('--meta_uri', dest='meta_uri', default=None, help='URI of meta store, meta/meta.sqlite')
    arg_parser.add_option('-o', '--output_dir', dest='output', default=None,
                          help='Output directory, default random directory')
    arg_parser.add_option('--cleanup', dest='cleanup', action='store_true', default=False,
                          help='Cleanup all the outputs after finished')
    arg_parser.add_option('--timeout', dest='timeout', default=86400,
                          help='Timeout in seconds, default is 86400')
    arg_parser.add_option('--interval', dest='interval', default=5.0,
                          help='Progress flush interval, default is 5 seconds')
    arg_parser.add_option('--report', dest='report', default=None,
                          help='Report file, default write to [output]/report.json')
    arg_parser.add_option('--summary_progress', dest='summary', default=None,
                          help="Extract interested (approximate Progress, separated by ',') progress records from "
                               "reports")
    arg_parser.add_option('--summary_interval', dest='summary_interval', default=0,
                          help="Extract interested progress records from reports")
    return arg_parser


def handle_help_and_exit(arg_options, arg_parser, nargs):
    try:
        arg_parser.print_help() if nargs == 1 or arg_options.help else None
        quit()
    except AttributeError:
        pass


if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, 
                        format="%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s")
    parser = opt_parser()
    (options, args) = parser.parse_args()
    handle_help_and_exit(options, parser, len(sys.argv))
    if options.summary or int(options.summary_interval) != 0:
        ProximaSEBuildBench.summary_reports(options.summary, int(options.summary_interval), *args)
        exit(0)

    logging.info(f'Arguments: {options}')
    output = options.output if options.output else tempfile.mktemp()
    logging.info(f'Run tools with output directory: {output}')

    code = 0
    task = ProximaSEBuildBench(output, options)
    if task.init():
        logging.info("Init bench tools succeed")
        task.start()
        task.wait_finish()
        task.stop()
        task.output_report()
    else:
        logging.error("Failed to init bench tools")
        code = 1

    summary = task.summary()
    del summary['progress_header']
    del summary['progress_table']
    logging.info(task.summary())
    task.cleanup()

    exit(code)


================================================
FILE: benchmark/scripts/query_bench.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE benchmark toolkits
#

import logging
import random
import threading
import time
import logging
from concurrent.futures import as_completed
from concurrent.futures.thread import ThreadPoolExecutor
from optparse import OptionParser
import asyncio

from pyproximase import *
from common.proxima_se_query import *



class Counter(object):
    def __init__(self):
        self._counts = []

    def counts(self):
        return len(self._counts)

    def _sum(self):
        return sum(self._counts)

    def avg(self):
        c = self.counts()
        return int(self._sum() / c) if c != 0 else 0

    def min(self):
        return min(self._counts) if self.counts() != 0 else 0

    def max(self):
        return max(self._counts) if self.counts() != 0 else 0

    def clear(self):
        self._counts = []

    def append(self, c):
        self._counts.append(c)



class PerfRecord(object):
    def __init__(self):
        self.succeed = 0
        self.failed = 0
        self.qps = 0
        self.latency_avg = 0
        self.latency_min = 0
        self.latency_max = 0



class BenchContext(object):
    def __init__(self, opts):
        self._options = opts
        self._collection = None
        self._queries = None

        self._lock = threading.Lock()
        self._counter = Counter()
        self._failed = 0
        self._start = time.monotonic()
        self.stopped = False

    def _proto(self):
        return 'http' if self._options.http else 'grpc'

    def init(self):
        logging.info("Init BenchContext.")
        if self.is_valid():
            logging.info("BenchContext have been initialized.")
            return True
        client = self.create_client()

        # Init collection
        status, self._collection = client.describe_collection(self._options.collection)
        if not status.ok():
            return False

        # Init query set
        self._queries = MysqlRawQuerySetCache(self._options.query, self._options.table,
                                              self._collection)
        self._queries.init()
        return self._queries.counts() != 0

    def cleanup(self):
        self._options = None
        self._collection = None
        self._queries = None
        logging.info("Cleanup BenchContext.")
        pass

    def is_valid(self):
        return self._options and self._collection and self._queries

    def query(self):
        return random.choice(self._queries)

    def create_client(self):
        return Client(*self._options.host.split(":"), self._proto())

    def create_async_client(self):
        if self._options.http:
            logging.warning('Asyncclient only support grpc')
        return AsyncClient(*self._options.host.split(":"))

    def collection(self):
        return self._collection.collection_config.collection_name

    def column(self, idx=0):
        return self._collection.collection_config.index_column_params[idx].name

    def topk(self):
        return int(self._options.topk)

    def success(self, latency):
        with self._lock:
            self._counter.append(latency)


    def failure(self, _):
        with self._lock:
            self._failed += 1

    def get_report_and_cleanup(self):
        record = PerfRecord()
        with self._lock:
            seconds = time.monotonic() - self._start
            record.succeed = self._counter.counts()
            record.failed = self._failed
            record.latency_avg = self._counter.avg()
            record.latency_min = self._counter.min()
            record.latency_max = self._counter.max()
            record.qps = int(record.succeed / seconds)
            self._counter.clear()
            self._failed = 0
            self._start = time.monotonic()
        return record


def opt_parser():
    arg_parser = OptionParser()
    arg_parser.add_option("--query", type=str, dest='query', default="",
                          help="The source of query, which should be DB connection")
    arg_parser.add_option("--table", type=str, dest="table", default="",
                          help="Table name")
    arg_parser.add_option("--collection", type=str, dest="collection", default="",
                          help="Proxima SE collection")
    arg_parser.add_option("--host", type=str, dest="host", default="",
                          help="Proxima SE grpc service")
    arg_parser.add_option("--topk", type=str, dest="topk", default='200',
                          help="Proxima SE topk, separated by ','")
    arg_parser.add_option("--threads", type=str, dest="threads", default='1',
                          help="Number of threads to run test")
    arg_parser.add_option('--http', dest='http', action='store_true', default=False,
                          help='Using http proto to test, default is grpc')
    arg_parser.add_option('--timeout', type=int, dest='timeout', default=60,
                          help='Total seconds for test')
    arg_parser.add_option('--interval', type=int, dest='interval', default=2,
                          help='Seconds for summary duration')
    arg_parser.add_option('--async_batch', type=int, dest='async_batch', default=0,
                          help='If greater than 0, AsyncClient will be used. '
                          'It should not be set too big(e.g. > 20), '
                          'as python sdk is dominated by protobuf (de)serializing.')
    return arg_parser


class BenchWorker(object):
    def __init__(self, bench_context):
        self.context = bench_context
        self.async_batch = self.context._options.async_batch
        if self.async_batch:
            self.client = context.create_async_client()
            self.loop = asyncio.get_event_loop()
        else:
            self.client = context.create_client()
        self.collection = context.collection()
        self.column = context.column()
        self.topk = context.topk()

    def __call__(self, *_, **__):
        def sync_query():
            while not self.context.stopped:
                start = time.time()
                status, resp = self.client.query(self.collection, 
                                                 self.column, 
                                                 self.context.query(),
                                                 topk=self.topk,
                                                 data_type=DataType.VECTOR_FP32,
                                                 batch_count=1,
                                                 dimension=self.context._queries.dimension())
                elapse = int((time.time() - start) * 1000)
                if status.ok():
                    self.context.success(elapse)
                else:
                    print(status, resp)
                    self.context.failure(elapse)
        async def async_query():
            while not self.context.stopped:
                start = time.time()
                count = self.async_batch
                queries = []
                for i in range(count):
                    queries.append(self.client.query(self.collection, 
                                                     self.column, 
                                                     self.context.query(),
                                                     topk=self.topk,
                                                     data_type=DataType.VECTOR_FP32,
                                                     batch_count=1,
                                                     dimension=self.context._queries.dimension()))
                responses = await asyncio.gather(*queries)
                elapse = int((time.time() - start) * 1000/count)
                for status, resp in responses:
                    if status.ok():
                        self.context.success(elapse)
                    else:
                        print(status, resp)
                        self.context.failure(elapse)
        if self.async_batch:
            self.loop.run_until_complete(async_query())
        else:
            sync_query()
        return True


class ProgressMonitor(object):
    def __init__(self, bench_context, interval):
        self.context = bench_context
        self.interval = interval
        print("   Total   Succeed   Failed     QPS  Latency(AVG)  Latency(Min)  Latency(Max)")

    def __call__(self, *_, **__):
        while not self.context.stopped:
            r = self.context.get_report_and_cleanup()
            print("%8d   %7d  %7d  %6d  %12d  %12d  %12d" %(r.succeed + r.failed, r.succeed, r.failed,
                                                       r.qps, r.latency_avg, r.latency_min, r.latency_max))
            time.sleep(self.interval)
        return True


def handle_help_and_exit(arg_options, arg_parser, nargs):
    try:
        arg_parser.print_help() if nargs == 1 or arg_options.help else None
        quit()
    except AttributeError:
        pass


if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, 
                        format="%(levelname)s %(asctime)s %(filename)s:%(lineno)d:%(funcName)s \t%(message)s")
    parser = opt_parser()
    (options, args) = parser.parse_args()
    handle_help_and_exit(options, parser, len(sys.argv))

    logging.info(f'Arguments: {options}')

    context = BenchContext(options)
    if not context.init():
        logging.error("Failed to init bench context")
        exit(1)

    threads = int(options.threads)
    pool = ThreadPoolExecutor(max_workers=threads+1, thread_name_prefix='BenchWorker')
    futures = list(map(lambda _: pool.submit(BenchWorker(context)), range(threads)))
    futures.append(pool.submit(ProgressMonitor(context, options.interval)))

    time.sleep(options.timeout)
    context.stopped = True

    for _ in as_completed(futures):
        pass
    pool.shutdown()

    exit(0)


================================================
FILE: benchmark/scripts/recall.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE benchmark toolkits
#
import concurrent
from concurrent.futures.thread import ThreadPoolExecutor
from optparse import OptionParser

from pyproximase import *

from common.proxima_se_query import *
from common.proxima2_dataset import *


class RecallContext(object):
    def __init__(self, recall_options):
        self._options = recall_options
        self._queries = None
        self._client = None
        self._collection = None
        self._collection_stat = None
        self._topk = []

    def init(self):
        logging.info("Init BenchContext.")
        if self.is_valid():
            logging.info("BenchContext have been initialized.")
            return True
        # Init admin
        self._client = Client(*self._options.host.split(":"))
        # Init collection
        code, self._collection = self._client.describe_collection(self._options.collection)
        assert code.ok()
        # Init collection stat
        code, self._collection_stat = self._client.stats_collection(self._options.collection)
        assert code.ok()
        # Init query producer
        self._queries = MysqlRawQuerySetCache(self._options.query, self._options.table, self._collection)
        self._queries.init()
        # Init Topk
        self._topk = [int(k) for k in self._options.topk.split(",")]
        self._topk.sort()
        logging.info(f'Parsing topk {self._topk}')
        if len(self._topk) == 0:
            logging.error("Parsing topk failed")
            return False

    def is_valid(self):
        return self._options and self._queries and \
               self._client and self._collection and \
               self._collection_stat and len(self._topk) != 0

    def client(self):
        return self._client

    def topk(self):
        return self._topk

    def max_topk(self):
        return self._topk[-1]

    def gt_count(self):
        return self.max_topk()

    def host(self):
        return self._options.host

    def sample_counts(self):
        return int(self._options.counts)

    def load_gt(self):
        gt = Proxima2GT(self.gt_count(), self._options.gt)
        gt.load()
        return gt

    def query(self, idx):
        features = self._queries.query(idx)
        return list(map(float, features[0].split(",")))

    def collection(self):
        return self._collection.collection_config.collection_name

    def column(self):
        return self._collection.collection_config.index_column_params[0].name

    def ef(self):
        if 'ef_search' in self._collection.collection_config.index_column_params[0].extra_params:
            return int(self._collection.collection_config.index_column_params[0].extra_params['ef_search'])
        return 500


def opt_parser():
    arg_parser = OptionParser()
    arg_parser.add_option("--query", type=str, dest='query', default="",
                          help="The source of query, which should be DB connection")
    arg_parser.add_option("--table", type=str, dest="table", default="",
                          help="Table name")
    arg_parser.add_option("--collection", type=str, dest="collection", default="",
                          help="Proxima SE collection")
    arg_parser.add_option("--host", type=str, dest="host", default="",
                          help="Proxima SE grpc service")
    arg_parser.add_option("--gt", type=str, dest="gt", default=None,
                          help="Proxima SE GT file")
    arg_parser.add_option("--topk", type=str, dest="topk", default='200',
                          help="Proxima SE topk, separated by ','")
    arg_parser.add_option("--counts", type=str, dest="counts", default=1,
                          help="Proxima SE query counts")
    arg_parser.add_option("--dump_mismatch", dest='dump_mismatch', action="store_true", default=False,
                          help='Dump mismatched result')
    return arg_parser


def handle_help_and_exit(arg_options, arg_parser, nargs):
    try:
        arg_parser.print_help() if nargs == 1 or arg_options.help else None
        quit()
    except AttributeError:
        pass


class ProximaSERecall(Proxima2GTRecall):
    def __init__(self, doc):
        super().__init__(doc.forward_column_values['p_key'], doc.score)
        self.doc_id = doc.primary_key


class ProximaSERecallEncoder(json.JSONEncoder):
    def default(self, x):
        if isinstance(x, ProximaSERecall):
            return {'doc_id': x.doc_id, 'pk': x.pk, 'score': x.score}
        elif isinstance(x, Proxima2GTRecord):
            return x.dumps()
        return super().default(self, x)


def _se_recall_record(r_context, feature, linear=False):
    status, response = r_context.client().query(r_context.collection(),
                                                r_context.column(),
                                                feature,
                                                topk=r_context.max_topk(),
                                                is_linear=linear, 
                                                data_type=DataType.VECTOR_FP32,
                                                batch_count=1)
    if status.ok():
        record = Proxima2GTRecord()
        for doc in response.results[0]:
            record.append(ProximaSERecall(doc))
        return True, record
    return False, None


def _diff_ground_truth(gt_context, mismatch_handler):
    gt = gt_context.load_gt()
    consist_count = 0
    for idx in range(gt_context.sample_counts()):
        code, recall = _se_recall_record(gt_context, gt_context.query(idx), True)
        if code:
            mismatched = recall.filter_score_not_in(gt.record(idx), gt_context.gt_count())
            if len(mismatched) != 0:
                mismatch_handler(idx, gt_context.gt_count(), mismatched)
            else:
                consist_count += 1
            print(f'{idx}, {round(float(gt_context.gt_count() - len(mismatched)) / gt_context.gt_count() * 100, 4)}')
    print("consist percentage: %.2f" % round(float(consist_count) / gt_context.sample_counts() * 100, 4))


def _print_header(topk):
    print("Processed", "  ef", " ".join(["%5s(%%)" % f'@{k}' for k in topk]))


def _print_summary(topk, ef, summary):
    samples = "%9d" % len(summary)
    stats = [samples, "%4d" % ef]
    for i in range(len(topk)):
        total = sum([metrics[i] for metrics in summary.values()])
        percent = round(total / len(summary) * 100, 4)
        stats.append("%8s" % str(percent))
    print(" ".join(stats))


class BatchRecall(object):
    def __init__(self, recall_context, start, end, mismatch_handler, reporter):
        self._context = recall_context
        self._start = start
        self._end = end
        self._mismatch_handler = mismatch_handler
        self._reporter = reporter
        self._pool = ThreadPoolExecutor(max_workers=(end - start), thread_name_prefix='BenchRecall')

    def __del__(self):
        self._pool.shutdown()

    @staticmethod
    def run_one(rc_context, idx, mismatch_handler):
        metrics = []
        feature = rc_context.query(idx)
        _, gt = _se_recall_record(rc_context, feature, True)
        code, knn = _se_recall_record(rc_context, feature)
        if code and knn.count() == rc_context.max_topk():
            for topk in rc_context.topk():
                mismatched = knn.filter_score_not_in(gt, topk)
                if len(mismatched) != 0:
                    mismatch_handler(idx, topk, mismatched)
                metrics.append(round(float(topk - len(mismatched)) / topk, 4))
        else:
            logging.error(f'Failed to get result of query: {idx}, topk {rc_context.max_topk()}')
            code = False

        if code:
            return idx, metrics
        return None, None

    def run(self):
        futures = [self._pool.submit(BatchRecall.run_one, self._context, i, self._mismatch_handler) for i in
                   range(self._start, self._end)]
        failed = False
        for future in concurrent.futures.as_completed(futures):
            idx, metrics = future.result()
            if not failed and idx is None:
                failed = True
            else:
                self._reporter(idx, metrics)
        return not failed


def _recall(recall_context, mismatch_handler):
    summary = {}

    def collector(index, stats):
        summary[index] = stats

    total = recall_context.sample_counts()
    interval = int(total / 20) if total > 50 else 1

    start = 0
    while start < total:
        if start == 0:
            _print_header(recall_context.topk())
        end = min(start + interval, total)
        bench = BatchRecall(recall_context, start, end, mismatch_handler, collector)
        if bench.run():
            _print_summary(recall_context.topk(), recall_context.ef(), summary)
        else:
            logging.error(f'Failed to run bench recall test from {start} to {end}')
            break
        start = end

    if len(summary) == recall_context.sample_counts():
        print("--------------------Recall Tests------------------")
        _print_header(recall_context.topk())
        _print_summary(recall_context.topk(), recall_context.ef(), summary)
        

def _skipped_handler(*_):
    pass


def _dump_mismatch(idx, topk, records):
    print('-----Mismatched Result-----')
    print(json.dumps({'query_id': idx, 'topk': topk, 'mismatched': records}, cls=ProximaSERecallEncoder, indent=2))


if __name__ == '__main__':
    parser = opt_parser()
    (options, args) = parser.parse_args()
    handle_help_and_exit(options, parser, len(sys.argv))

    context = RecallContext(options)
    context.init()

    handler = _dump_mismatch if options.dump_mismatch else _skipped_handler
    if options.gt:
        _diff_ground_truth(context, handler)
    else:
        _recall(context, handler)


================================================
FILE: benchmark/scripts/vec2txt.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Proxima SE bench toolkits
#

import sys
from optparse import OptionParser
from common.proxima2_dataset import *


def opt_parser():
    arg_parser = OptionParser()
    arg_parser.add_option('--vec', dest='vec', default=None, help="Proxima2 vectors file")
    arg_parser.add_option('--header', dest='header', action="store_true", default=False, help='Dump header')
    arg_parser.add_option('-o', '--output', dest='output', default='data', help='output directory')
    arg_parser.add_option('-s', '--segment_size', dest='segment', default=1000000, help='segment size')
    arg_parser.add_option('--begin', dest='begin', default=0, help='The beginner of vector')
    arg_parser.add_option('--end', dest='end', default=-1, help='The end of vector')
    return arg_parser


def handle_help_and_exit(arg_options, arg_parser, nargs):
    try:
        arg_parser.print_help() if nargs == 1 or arg_options.help else None
        quit()
    except Exception as e:
        # ignore help exception
        pass


class VectorWriter(object):
    def __init__(self):
        pass

    def write(self, key, vector):
        pass


class SQLWriter(VectorWriter):
    def __init__(self):
        VectorWriter.__init__(self)

    def write(self, key, vector):
        pass


class RawWriter(VectorWriter):
    def __init__(self, output, segment):
        VectorWriter.__init__(self)
        self._output = output
        self._segment_size = segment
        self._count = 0
        self._segment_id = 0
        self._segment = None

    def __del__(self):
        self._close_segment()

    def _close_segment(self):
        if self._segment:
            self._segment.close()
        self._segment = None

    def _segment_name(self):
        return os.path.join(self._output, "segment.%03d" % self._segment_id)

    def _open_segment(self):
        self._close_segment()
        self._segment = open(self._segment_name(), 'w+')
        self._segment_id += 1

    def write(self, key, vector):
        if self._count % self._segment_size == 0:
            self._open_segment()
        fields = [','.join([str(v) for v in vector]), str(key), "%f" % vector[0], str(vector[0])]
        self._segment.write("%s\n" % "|".join(fields))
        self._count += 1


if __name__ == '__main__':
    parser = opt_parser()
    (options, args) = parser.parse_args()
    handle_help_and_exit(options, parser, len(sys.argv))

    if options.vec and os.path.isfile(options.vec) and options.vec.endswith(".vecs2"):
        output = RawWriter(options.output, int(options.segment))
        vectors = Proxima2VectorsReader(RandomMMapReader(options.vec))
        vectors.load()
        if vectors.is_valid():
            if options.header:
                print(vectors.header().json())
                print(vectors.meta().json())

            begin = int(options.begin) if int(options.begin) >= 0 else 0
            end = int(options.end) if int(options.end) >= 0 else vectors.num_vectors()
            while begin < end:
                output.write(vectors.key(begin), vectors.vector(begin))
                begin += 1
                if begin % 100000 == 0:
                    print(begin)
        else:
            print("Failed to open vectors")
            exit(1)
        vectors.unload()
    else:
        print("Lost argument vec, which should be Dataset of Proxima2")
        parser.print_help()
    exit(0)


================================================
FILE: benchmark/sql/create_table.sql
================================================
########################################################################
#  face 512 database
create database vts_face_fp32_512d;
use vts_face_fp32_512d;

DROP TABLE IF EXISTS vts_face_fp32_512d;
create table vts_face_fp32_512d (
  id int(11) primary key not null unique auto_increment,
  vector varchar(10240) not null,
  p_key bigint not null,
  text_field varchar(20),
  float_field float not null
) CHARSET=utf8 AUTO_INCREMENT=1;



load data infile '/var/lib/mysql-files/segment.000' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.001' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.002' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.003' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.004' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.005' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.006' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.007' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.008' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.009' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.010' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.011' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.012' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.013' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.014' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.015' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.016' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.017' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/segment.018' ignore into table vts_face_fp32_512d character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);


DROP TABLE IF EXISTS vts_face_fp32_512d_2w;
create table vts_face_fp32_512d_2w (
                                    id int(11) primary key not null unique auto_increment,
                                    vector varchar(10240) not null,
                                    p_key bigint not null,
                                    text_field varchar(20),
                                    float_field float not null
) CHARSET=utf8 AUTO_INCREMENT=1;

load data infile '/var/lib/mysql-files/segment.2w.000' ignore into table vts_face_fp32_512d_2w character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);


DROP TABLE IF EXISTS vts_face_fp32_512d_1m;
create table vts_face_fp32_512d_1m (
                                       id int(11) primary key not null unique auto_increment,
                                       vector varchar(10240) not null,
                                       p_key bigint not null,
                                       text_field varchar(20),
                                       float_field float not null
) CHARSET=utf8 AUTO_INCREMENT=1;

load data infile '/var/lib/mysql-files/segment.000' ignore into table vts_face_fp32_512d_1m character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);


DROP TABLE IF EXISTS vts_face_fp32_512d_q;
create table vts_face_fp32_512d_q (
                                       id int(11) primary key not null unique auto_increment,
                                       vector varchar(10240) not null,
                                       p_key bigint not null
) CHARSET=utf8 AUTO_INCREMENT=1;

load data infile '/var/lib/mysql-files/query.000' ignore into table vts_face_fp32_512d_q character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`);


########################################################################
#  50M 512D database
create database chinese_address_512d_l2_norm;
use chinese_address_512d_l2_norm;

DROP TABLE IF EXISTS chinese_address_512d_l2_norm;
create table chinese_address_512d_l2_norm (
                                    id int(11) primary key not null unique auto_increment,
                                    vector varchar(10240) not null,
                                    p_key bigint not null,
                                    text_field varchar(20),
                                    float_field float not null
) CHARSET=utf8 AUTO_INCREMENT=1;

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.000' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.001' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.002' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.003' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.004' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.005' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.006' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.007' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.008' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.009' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.010' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.011' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.012' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.013' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.014' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.015' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.016' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.017' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.018' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.019' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.020' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.021' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.022' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.023' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.024' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.025' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.026' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.027' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.028' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.029' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.030' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.031' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.032' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.033' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.034' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.035' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.036' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.037' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.038' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.039' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);


load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.040' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.041' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.042' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.043' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.044' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.045' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.046' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.047' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.048' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.049' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.050' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.051' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.052' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.053' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.054' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);
load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/segment.055' ignore into table chinese_address_512d_l2_norm character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`,`text_field`, `float_field`);


DROP TABLE IF EXISTS chinese_address_512d_l2_norm_q;
create table chinese_address_512d_l2_norm_q (
                                      id int(11) primary key not null unique auto_increment,
                                      vector varchar(10240) not null,
                                      p_key bigint not null
) CHARSET=utf8 AUTO_INCREMENT=1;

load data infile '/var/lib/mysql-files/chinese_address_512d_l2_norm/query.000' ignore into table chinese_address_512d_l2_norm_q character set utf8 fields
terminated by '|' enclosed by '"' lines terminated by '\n' (`vector`,`p_key`);

########################################################################

INSERT INTO vts_face_fp32_512d_q(vector, p_key) VALUES ('-0.018950,-0.027601,0.029433,-0.049073,-0.022660,-0.005965,0.056194,0.005138,0.055736,-0.017441,-0.015001,-0.036576,0.004568,-0.058825,-0.071009,0.006936,0.041904,0.020544,0.029058,0.016218,-0.037882,0.008780,-0.010335,-0.003099,0.079163,0.064205,-0.003475,0.001644,0.015865,-0.005466,-0.027281,0.008134,-0.071116,-0.021186,0.025063,-0.072102,-0.058192,-0.053226,0.058055,-0.043831,0.019077,-0.044566,-0.008920,0.067477,0.005366,0.053768,0.064434,0.006666,0.002357,0.021475,-0.002751,-0.012222,-0.051546,0.013340,-0.019127,0.023062,-0.015804,-0.070216,0.016976,-0.056982,-0.010817,-0.056350,0.014693,-0.017572,0.100992,-0.001988,0.026432,-0.081943,0.018010,0.000795,-0.023242,0.020200,-0.040964,-0.035147,-0.008796,-0.011831,-0.051079,0.031011,-0.057911,0.039357,0.045563,-0.020473,-0.014889,0.021077,-0.087319,-0.050683,-0.000506,-0.015053,0.063425,0.023479,0.013168,-0.049454,-0.023739,-0.039333,0.035981,-0.039312,-0.039243,0.001949,0.016238,-0.133142,-0.039268,0.066276,0.018204,-0.033430,-0.047440,0.022615,0.000749,0.083299,-0.047930,0.008380,-0.082127,0.014617,0.001402,0.082150,-0.001830,0.018488,0.000286,0.053385,-0.089946,0.021997,0.021003,0.027360,0.036879,-0.059475,-0.018871,0.092225,0.029489,-0.026508,-0.015768,-0.012865,0.088295,0.016123,-0.029778,-0.102396,0.005653,0.033438,0.076318,0.047537,-0.019370,0.003880,-0.038357,-0.069244,0.013206,0.052731,-0.044422,-0.045984,0.064287,0.063458,0.012366,0.046554,-0.014541,-0.046981,0.040710,0.007809,0.019138,-0.031280,0.005744,-0.032424,0.013631,0.032215,-0.045975,0.002801,0.115970,-0.013436,-0.035482,-0.006199,0.078901,-0.064859,0.005653,-0.051042,0.008569,0.044996,0.010914,0.070450,-0.046443,0.003210,-0.026466,0.028877,-0.051071,-0.020633,0.051578,-0.120661,-0.010065,-0.023436,0.001714,-0.032687,-0.016210,0.005997,-0.082633,0.097420,-0.031321,0.029058,0.060846,0.062699,-0.024812,0.038409,-0.007182,0.021995,0.030892,-0.007325,-0.077771,-0.006569,-0.070532,-0.021422,0.049408,-0.109623,0.005212,-0.004861,0.012130,0.043313,0.009163,0.050616,-0.040313,-0.002631,-0.001109,0.001306,-0.022754,-0.021270,-0.056147,0.051881,0.031744,-0.020617,0.016948,0.025522,0.016708,-0.035161,0.053157,-0.002037,-0.003167,0.111554,-0.002936,-0.028547,-0.095569,0.004574,0.050479,-0.032712,-0.010738,0.060238,-0.038399,0.042237,0.021586,-0.083791,-0.020363,-0.017915,-0.001482,-0.038230,0.015712,-0.006684,0.031344,-0.068242,0.020323,0.002729,0.025776,-0.061503,0.010611,0.017804,0.041669,0.012392,-0.060341,-0.024900,-0.063002,-0.001920,-0.032915,-0.000960,-0.021514,-0.014564,0.061115,-0.076246,-0.062856,-0.071194,-0.021202,-0.016131,-0.059900,-0.034610,-0.040206,-0.042895,-0.002483,0.044605,0.001372,-0.101529,-0.001828,-0.103048,-0.031297,-0.016878,-0.023834,0.050420,0.024020,-0.011137,-0.140238,-0.051979,0.085020,0.038933,0.127042,0.041524,-0.030117,0.056891,-0.053334,-0.030602,0.011756,0.007324,-0.030329,-0.062977,-0.042806,-0.007362,0.021153,-0.025529,-0.021425,0.036511,0.010076,-0.065501,0.007580,0.092202,-0.019660,-0.006779,-0.014505,-0.011312,-0.048175,0.008486,0.047491,0.037514,-0.027510,-0.039198,-0.100382,-0.045332,0.016991,-0.006936,-0.017366,-0.007444,0.014395,-0.003089,-0.020629,0.027420,0.024758,0.070364,-0.011739,-0.032171,-0.019401,0.007725,-0.013883,-0.045235,0.054859,0.061361,-0.064525,0.064236,0.056047,-0.064166,-0.031746,-0.001632,-0.031432,-0.063762,-0.031150,-0.018962,-0.014152,0.030340,0.027059,0.049580,-0.025282,-0.031288,0.013674,0.060906,0.045000,0.019587,-0.023220,-0.081773,-0.027007,0.018261,-0.000590,-0.040861,-0.105557,0.015284,0.028116,-0.032138,-0.002735,0.066251,0.046955,0.054924,0.023915,0.109000,-0.056548,0.015768,-0.075634,-0.020457,-0.028878,-0.046798,-0.057080,0.057820,0.037019,0.038066,-0.009608,-0.039675,0.005541,0.028341,-0.005972,0.053169,0.018158,0.067248,0.012660,0.055927,0.031064,0.021389,-0.080137,-0.026971,-0.028203,-0.037743,-0.015084,0.049724,-0.077273,0.035753,-0.000662,0.001476,-0.046561,-0.060630,0.031582,0.057681,0.037149,0.012713,-0.017181,-0.043256,0.003465,0.022548,0.052186,-0.040553,0.064455,0.021539,0.018883,-0.069429,-0.049200,0.070659,0.077909,-0.020314,0.082661,-0.024631,0.018384,0.056514,-0.051840,0.033918,-0.048232,-0.007297,-0.031624,-0.117258,-0.053612,-0.009953,-0.031192,0.043974,-0.008840,-0.015087,0.042430,-0.065707,0.056052,-0.028191,0.049596,-0.002935,-0.000412,0.019444,0.055688,0.109548,0.038258,0.014887,-0.033741,0.042629,-0.022666,-0.032125,-0.009331,0.059250,0.009829,-0.028745,-0.025815,-0.010050,0.011845,0.103870,0.020677,0.052920,-0.001595,-0.023385,-0.020915,-0.023902,0.039025,-0.056825,-0.063770,-0.001545,-0.023381,-0.013910,0.016631,0.021308,0.067967,-0.011235,0.056421,-0.001273,-0.027336,0.009527,0.042496,0.022707,0.083721,-0.012626,-0.085037,-0.001673,-0.028829,-0.013406,0.024951,0.048866,-0.011498,-0.059011,-0.011989,-0.016756,0.029857,0.103094,0.007111,-0.041760,0.002769,0.029121,-0.013594,0.004342', 4);
INSERT INTO vts_face_fp32_512d_q(vector, p_key) VALUES ('0.018990,-0.026564,-0.074380,-0.080027,-0.003530,0.020116,-0.026819,-0.055056,-0.050954,-0.016818,-0.055611,-0.018200,-0.050677,-0.049803,-0.047470,0.088019,-0.090301,0.005176,0.089186,0.005646,-0.033093,-0.019510,-0.000758,-0.022662,-0.072344,-0.022143,-0.065633,0.007557,-0.051194,0.081988,0.003223,-0.025066,0.042486,-0.040949,0.018456,0.074975,-0.039089,-0.055742,-0.001078,0.054048,0.039184,0.046202,-0.071246,-0.037686,0.010271,-0.114977,-0.009068,0.002448,-0.053331,-0.012330,-0.015430,-0.014888,0.041111,-0.013474,0.034354,0.003789,0.083562,0.041563,0.008410,0.037660,0.028192,-0.005239,0.051109,-0.000177,0.052671,0.017819,-0.036006,0.034817,-0.022381,0.031019,0.061063,-0.018029,0.031324,0.060098,0.126787,0.023183,-0.016489,-0.007297,0.070049,0.025467,0.029072,0.001847,0.001005,0.117192,-0.035301,-0.037476,0.038708,-0.007165,0.016045,0.017104,0.079098,0.023868,0.001864,0.009841,-0.019286,-0.030859,-0.003673,0.029864,-0.002053,0.086085,0.019369,-0.011575,-0.043770,0.058725,0.073420,0.081043,0.028588,0.010871,-0.035738,-0.039326,0.037432,-0.037647,0.001318,0.043523,-0.018898,-0.042326,0.010487,-0.047589,-0.056921,-0.011206,-0.018926,0.027976,-0.040548,0.031734,0.012047,-0.011499,-0.021265,-0.030023,0.039084,0.000235,0.002119,-0.035474,-0.059109,-0.001139,0.000803,-0.026916,-0.007739,-0.063737,-0.052308,-0.074166,0.013420,0.004411,-0.017026,-0.084907,-0.000459,0.018069,0.015364,-0.046284,-0.051097,-0.065892,-0.016638,-0.035136,0.021947,-0.089489,0.033304,0.026275,0.072900,0.086350,-0.094363,0.022757,-0.000078,0.014630,-0.015252,0.048451,-0.022585,-0.057376,0.032287,-0.044275,-0.012600,-0.003670,-0.011928,-0.094233,-0.057325,0.015122,0.066657,0.081942,0.036027,0.090712,0.076276,-0.017960,-0.010482,0.087801,0.136267,-0.074674,0.029554,0.003440,-0.043471,-0.006148,-0.038998,0.028725,0.066128,-0.029892,-0.005003,-0.063408,-0.006527,-0.067585,-0.012122,-0.023724,0.007523,0.028675,-0.010489,0.019769,0.024188,-0.086028,-0.009872,0.006107,0.025676,0.044236,-0.038995,-0.009083,0.003050,-0.079702,-0.015497,0.006418,-0.051633,0.015834,0.065541,0.006776,0.053002,0.014452,-0.004406,0.006974,0.014991,-0.005093,0.037989,-0.083318,-0.099467,0.019911,-0.001837,-0.078542,0.013706,0.077943,0.077858,-0.037037,0.000138,-0.010079,-0.128671,0.002789,0.035846,-0.002067,-0.082037,0.002213,-0.011649,-0.026202,0.081602,-0.030421,-0.021853,-0.014350,-0.030303,-0.003272,-0.026875,0.005095,-0.021909,0.029722,-0.021974,0.028804,-0.032812,0.047766,0.009548,0.055889,0.020871,0.013290,0.009591,-0.056730,0.107562,0.004044,-0.046458,0.019570,-0.005909,0.036564,-0.079987,-0.004859,-0.006975,0.050858,0.002987,0.004677,-0.046685,-0.044758,-0.024142,-0.020945,0.007080,-0.015139,0.005727,-0.040768,0.132578,0.000116,-0.014818,-0.054616,-0.036315,0.061882,-0.037466,-0.024772,0.010992,-0.033946,0.068233,0.033256,0.001423,-0.017947,-0.074121,0.038813,0.017305,0.013695,-0.024176,-0.039063,0.030579,-0.066201,0.058209,0.022739,0.074405,0.044019,-0.038122,-0.106768,0.010272,0.014302,-0.021927,0.025372,0.002067,-0.064063,-0.061733,0.036851,0.065449,-0.007891,0.013536,-0.013212,0.026221,0.049972,-0.009896,-0.024969,0.003525,0.002189,-0.039483,0.041425,0.074186,-0.010678,-0.051394,-0.006110,0.001774,-0.042279,0.037422,0.088283,0.034655,-0.001786,0.059899,0.000806,0.009341,0.068523,0.034918,0.058531,0.000901,0.003348,0.026887,-0.055659,0.040627,-0.112764,0.010084,0.080034,0.015784,-0.003562,0.009442,0.009441,0.041112,-0.014453,-0.039941,0.079657,-0.055720,-0.018789,0.077986,-0.022412,-0.018566,0.002274,0.034367,0.000179,0.024719,-0.008818,0.001224,-0.027264,0.031056,-0.007380,0.001956,-0.061412,0.071740,0.039339,0.004653,-0.034407,0.056294,0.022648,-0.032928,-0.086359,0.014597,0.075572,-0.031202,-0.053848,-0.009450,-0.047667,-0.043598,-0.025867,-0.088403,-0.011794,0.063497,-0.009792,0.032514,-0.000666,0.019377,-0.040243,0.010717,-0.060903,-0.025458,-0.032373,-0.008307,0.041381,-0.013571,0.011215,0.076445,-0.020289,-0.060025,-0.037909,0.062530,-0.095224,0.017458,0.072853,-0.061164,-0.035332,0.012541,-0.021209,0.011143,-0.025961,0.029610,0.043860,0.013443,-0.040672,-0.025607,-0.004672,-0.030812,0.011047,0.016260,0.048821,-0.033020,-0.003214,0.013867,0.075351,-0.060843,-0.005076,0.002915,0.003891,0.065470,-0.006947,0.007156,-0.035394,0.032894,-0.056455,-0.009901,0.028474,0.034317,-0.047070,-0.004093,-0.011997,0.086919,0.044756,0.031250,0.050920,0.016834,0.062481,0.009912,-0.086627,-0.010909,0.043168,-0.003410,0.033574,0.020280,-0.033200,-0.070535,0.002198,0.006363,-0.038977,0.019581,0.049575,0.004098,-0.029766,-0.003892,-0.023865,0.034137,-0.018515,-0.119172,-0.050676,0.031222,0.085486,-0.042790,0.013223,-0.013531,-0.068723,0.022705,0.088682,-0.043891,-0.011074,0.025330,0.064888,-0.058756,0.024609,-0.023462,0.044005,-0.043933,0.033105,-0.019530,0.047792,0.037710,-0.082358,-0.027842,0.049849,0.002086,0.034141,0.025395,0.035188', 2);

================================================
FILE: benchmark/tests/service_test.py
================================================
#! /usr/bin/env python
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Service test script
#

from common.proxima_se_service import *


def test_proxima_se_service(service: ProximaSEService):
    if service.init():
        logging.info(f'Initialize {service.service_name()} succeed')
    else:
        logging.error(f'Failed initialize {service.service_name()}')
        return

    if service.start():
        logging.info(f'Start {service.service_name()} success')
    else:
        service.cleanup()
        logging.error(f'Start {service.service_name()} failed')
        return

    logging.info(f'Status: {service.status().name}')
    time.sleep(10)

    if service.stop():
        logging.info(f'Stop {service.service_name()} success')
    else:
        logging.error(f'Stop {service.service_name()} failed')

    logging.info(f'Status: {service.status().name}')
    if service.cleanup():
        logging.info(f'Cleanup {service.service_name()} succeed')


def test_mysql_repo():
    test_proxima_se_service(
        ProximaSEMysqlRepo("../../cmake-build-debug/bin/mysql_repository", "conf/mysql_repo.conf", "bench"))


def test_proxima_se():
    test_proxima_se_service(
        ProximaSE("../../cmake-build-debug/bin/proxima_se", "conf/proxima_se.conf", "bench"))


if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    test_mysql_repo()
    test_proxima_se()
    exit(0)


================================================
FILE: cmake/README.md
================================================
**bazel.cmake** 是一个 bazel 风格的 CMake 模块框架,用于 C/C++/CUDA 等代码的编译和构建,支持 Ninja, GNU Make, Unix Make, Visual Studio 等构建平台。

## 如何使用

#### 1. 脚本引入 bazel.cmake

```cmake
# CMakeLists.txt
include(<bazel.cmake 脚本路径>)
```

#### 2. 编写构建代码

```cmake
# CMakeLists.txt
find_package(Threads REQUIRED)

cc_library(
    NAME hello STATIC SHARED STRICT
    SRCS *.cc
    LIBS ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}
    INCS .
  )
```

#### 3. 生成平台构建脚本

```bash
$ cmake -G Ninja ..
$ ninja all
```

## 相关接口

### 1. C/C++ 构建接口

#### 1.1. 新增 C/C++ 构建子目录

```cmake
cc_directory(<source_dir> [binary_dir])
```

#### 1.2. 新增多个 C/C++ 构建子目录

```cmake
cc_directories(<source_dir1> [source_dir2 ...])
```

#### 1.3. 构建 C/C++ 静态或动态库(支持同时生成静态和动态库)

```cmake
cc_library(
    NAME <name>
    [STATIC] [SHARED] [STRICT] [ALWAYS_LINK] [EXCLUDE] [PACKED]
    SRCS <file1> [file2 ...]
    [INCS dir1 ...]
    [PUBINCS public_dir1 ...]
    [DEFS DEF1=1 ...]
    [LIBS lib1 ...]
    [CFLAGS flag1 ...]
    [CXXFLAGS flag1 ...]
    [LDFLAGS flag1 ...]
    [DEPS target1 ...]
    [PACKED_EXCLUDES pattern1 ...]
    [VERSION <version>]
  )
```

#### 1.4. 构建 C/C++ 可执行程序

```cmake
cc_binary(
    NAME <name>
    [STRICT] [PACKED]
    SRCS <file1> [file2 ...]
    [INCS dir1 ...]
    [DEFS DEF1=1 ...]
    [LIBS lib1 ...]
    [CFLAGS flag1 ...]
    [CXXFLAGS flag1 ...]
    [LDFLAGS flag1 ...]
    [DEPS target1 ...]
    [VERSION <version>]
  )
```

#### 1.5. 构建 C/C++ 可执行测试程序

```cmake
cc_test(
    NAME <name>
    [STRICT]
    SRCS <file1> [file2 ...]
    [INCS dir1 ...]
    [DEFS DEF1=1 ...]
    [LIBS lib1 ...]
    [CFLAGS flag1 ...]
    [CXXFLAGS flag1 ...]
    [LDFLAGS flag1 ...]
    [DEPS target1 ...]
    [ARGS args1 ...]
  )
```

#### 1.6. 添加测试用例到测试集合,通过目标 unittest.<suite_name> 可运行

```cmake
cc_test_suite(<suite_name> [test_name ...])
```

#### 1.7. 导入外部已构建的 C/C++ 静态或动态库

```cmake
cc_import(
    NAME <name>
    [STATIC | SHARED] [PACKED]
    PATH <file>
    [INCS dir1 ...]
    [PUBINCS public_dir1 ...]
    [DEPS target1 ...]
    [IMPLIB <file>]
    [PACKED_EXCLUDES pattern1 ...]
  )
```

#### 1.8. 导入外部 C/C++ 接口库(仅依赖头文件,不链接)

```cmake
cc_interface(
    NAME <name>
    [PACKED]
    [INCS dir1 ...]
    [PUBINCS public_dir1 ...]
    [DEPS target1 ...]
    [PACKED_EXCLUDES pattern1 ...]
  )
```

#### 1.9. 构建 C/C++ GoogleTest 单元测试程序

```cmake
cc_gtest(
    NAME <name>
    [STRICT]
    SRCS <file1> [file2 ...]
    [INCS dir1 ...]
    [DEFS DEF1=1 ...]
    [LIBS lib1 ...]
    [CFLAGS flag1 ...]
    [CXXFLAGS flag1 ...]
    [LDFLAGS flag1 ...]
    [DEPS target1 ...]
    [ARGS args1 ...]
    [VERSION <version>]
  )
```

#### 1.10. 构建 C/C++ GoogleMock 单元测试程序

```cmake
cc_gmock(
    NAME <name>
    [STRICT]
    SRCS <file1> [file2 ...]
    [INCS dir1 ...]
    [DEFS DEF1=1 ...]
    [LIBS lib1 ...]
    [CFLAGS flag1 ...]
    [CXXFLAGS flag1 ...]
    [LDFLAGS flag1 ...]
    [DEPS
Download .txt
gitextract_m01w5_is/

├── .clang-format
├── .git/
│   ├── HEAD
│   ├── config
│   ├── description
│   ├── hooks/
│   │   ├── applypatch-msg.sample
│   │   ├── commit-msg.sample
│   │   ├── fsmonitor-watchman.sample
│   │   ├── post-update.sample
│   │   ├── pre-applypatch.sample
│   │   ├── pre-commit.sample
│   │   ├── pre-merge-commit.sample
│   │   ├── pre-push.sample
│   │   ├── pre-rebase.sample
│   │   ├── pre-receive.sample
│   │   ├── prepare-commit-msg.sample
│   │   ├── push-to-checkout.sample
│   │   ├── sendemail-validate.sample
│   │   └── update.sample
│   ├── index
│   ├── info/
│   │   └── exclude
│   ├── logs/
│   │   ├── HEAD
│   │   └── refs/
│   │       ├── heads/
│   │       │   └── master
│   │       └── remotes/
│   │           └── origin/
│   │               └── HEAD
│   ├── objects/
│   │   └── pack/
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.idx
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.pack
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor
│   │       ├── pack-50d7469b15937123b6a9d2f6b0fef35befd95527.rev
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.idx
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.pack
│   │       ├── pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor
│   │       └── pack-9d01884951ce3c844b4ee264b844b04baca4920c.rev
│   ├── packed-refs
│   ├── refs/
│   │   ├── heads/
│   │   │   └── master
│   │   └── remotes/
│   │       └── origin/
│   │           └── HEAD
│   └── shallow
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── Dockerfile
├── LICENSE
├── README.md
├── benchmark/
│   ├── README.md
│   ├── __init__.py
│   ├── common/
│   │   ├── __init__.py
│   │   ├── exceptions.py
│   │   ├── mysql_utils.py
│   │   ├── proxima2_dataset.py
│   │   ├── proxima_be_query.py
│   │   ├── proxima_be_repo.py
│   │   ├── proxima_be_service.py
│   │   └── runner.py
│   ├── requirements.txt
│   ├── scripts/
│   │   ├── build_bench.py
│   │   ├── query_bench.py
│   │   ├── recall.py
│   │   └── vec2txt.py
│   ├── sql/
│   │   └── create_table.sql
│   └── tests/
│       └── service_test.py
├── cmake/
│   ├── README.md
│   ├── bazel.cmake
│   └── option.cmake
├── deps/
│   ├── proxima/
│   │   ├── CMakeLists.txt
│   │   ├── include/
│   │   │   ├── ailego/
│   │   │   │   ├── algorithm/
│   │   │   │   │   └── rate_limiter.h
│   │   │   │   ├── container/
│   │   │   │   │   ├── bitmap.h
│   │   │   │   │   ├── cube.h
│   │   │   │   │   ├── heap.h
│   │   │   │   │   ├── hypercube.h
│   │   │   │   │   ├── vector.h
│   │   │   │   │   └── vector_array.h
│   │   │   │   ├── debug/
│   │   │   │   │   ├── bug_report.h
│   │   │   │   │   ├── symbol_table.h
│   │   │   │   │   ├── user_context.h
│   │   │   │   │   ├── user_context_darwin.h
│   │   │   │   │   └── user_context_linux.h
│   │   │   │   ├── encoding/
│   │   │   │   │   ├── base64.h
│   │   │   │   │   ├── json/
│   │   │   │   │   │   ├── mod_json.h
│   │   │   │   │   │   └── mod_json_plus.h
│   │   │   │   │   ├── json.h
│   │   │   │   │   └── uri.h
│   │   │   │   ├── hash/
│   │   │   │   │   ├── crc32c.h
│   │   │   │   │   ├── fnv1.h
│   │   │   │   │   └── jump_hash.h
│   │   │   │   ├── internal/
│   │   │   │   │   └── platform.h
│   │   │   │   ├── io/
│   │   │   │   │   ├── file.h
│   │   │   │   │   ├── file_lock.h
│   │   │   │   │   ├── file_writer.h
│   │   │   │   │   ├── mmap_file.h
│   │   │   │   │   └── pid_file.h
│   │   │   │   ├── parallel/
│   │   │   │   │   ├── lock.h
│   │   │   │   │   ├── semaphore.h
│   │   │   │   │   ├── thread_pool.h
│   │   │   │   │   └── thread_queue.h
│   │   │   │   ├── pattern/
│   │   │   │   │   ├── closure.h
│   │   │   │   │   ├── defer.h
│   │   │   │   │   ├── factory.h
│   │   │   │   │   ├── scope_guard.h
│   │   │   │   │   └── singleton.h
│   │   │   │   ├── string/
│   │   │   │   │   ├── string_concat_helper.h
│   │   │   │   │   └── string_view.h
│   │   │   │   ├── utility/
│   │   │   │   │   ├── bitset_helper.h
│   │   │   │   │   ├── dl_helper.h
│   │   │   │   │   ├── file_helper.h
│   │   │   │   │   ├── float_helper.h
│   │   │   │   │   ├── process_helper.h
│   │   │   │   │   ├── string_helper.h
│   │   │   │   │   ├── string_helper_impl.h
│   │   │   │   │   ├── time_helper.h
│   │   │   │   │   └── type_helper.h
│   │   │   │   ├── version.h
│   │   │   │   └── version.i
│   │   │   └── aitheta2/
│   │   │       ├── index_closet.h
│   │   │       ├── index_container.h
│   │   │       ├── index_context.h
│   │   │       ├── index_converter.h
│   │   │       ├── index_document.h
│   │   │       ├── index_dumper.h
│   │   │       ├── index_error.h
│   │   │       ├── index_factory.h
│   │   │       ├── index_filter.h
│   │   │       ├── index_format.h
│   │   │       ├── index_framework.h
│   │   │       ├── index_helper.h
│   │   │       ├── index_holder.h
│   │   │       ├── index_logger.h
│   │   │       ├── index_measure.h
│   │   │       ├── index_meta.h
│   │   │       ├── index_module.h
│   │   │       ├── index_packer.h
│   │   │       ├── index_params.h
│   │   │       ├── index_plugin.h
│   │   │       ├── index_provider.h
│   │   │       ├── index_reformer.h
│   │   │       ├── index_searcher.h
│   │   │       ├── index_stats.h
│   │   │       ├── index_storage.h
│   │   │       ├── index_streamer.h
│   │   │       ├── index_threads.h
│   │   │       ├── index_unpacker.h
│   │   │       └── index_version.h
│   │   └── lib/
│   │       ├── Linux.x86_64.broadwell/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.haswell/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.nehalem/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.sandybridge/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.skylake/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.skylake_avx512/
│   │       │   └── libproxima.so.2.5.0
│   │       ├── Linux.x86_64.znver1/
│   │       │   └── libproxima.so.2.5.0
│   │       └── Linux.x86_64.znver2/
│   │           └── libproxima.so.2.5.0
│   └── thirdparty/
│       ├── .gitignore
│       ├── CMakeLists.txt
│       ├── brpc/
│       │   └── CMakeLists.txt
│       ├── gflags/
│       │   └── CMakeLists.txt
│       ├── glog/
│       │   └── CMakeLists.txt
│       ├── googletest/
│       │   └── CMakeLists.txt
│       ├── leveldb/
│       │   └── CMakeLists.txt
│       ├── mysql/
│       │   └── CMakeLists.txt
│       ├── ncurses/
│       │   └── CMakeLists.txt
│       ├── openssl/
│       │   └── CMakeLists.txt
│       ├── patches/
│       │   └── brpc.patch
│       ├── protobuf/
│       │   └── CMakeLists.txt
│       ├── snappy/
│       │   └── CMakeLists.txt
│       ├── sparsehash/
│       │   └── CMakeLists.txt
│       └── sqlite/
│           └── CMakeLists.txt
├── scripts/
│   ├── README.md
│   ├── conf/
│   │   ├── proxima_be.conf
│   │   └── proxima_se.conf
│   ├── gcc4.9-build.sh
│   ├── gcc4.9-unittest.sh
│   ├── gcc8.3-build.sh
│   ├── gcc8.3-integration.sh
│   ├── gcc8.3-unittest.sh
│   ├── gcov.sh
│   ├── hooks/
│   │   ├── clang-format.sh
│   │   ├── common.sh
│   │   ├── post-commit
│   │   └── pre-commit
│   └── install-git-hooks.sh
├── sdk/
│   ├── CMakeLists.txt
│   ├── cpp/
│   │   ├── CMakeLists.txt
│   │   ├── README.txt
│   │   ├── examples/
│   │   │   └── client_example.cc
│   │   ├── include/
│   │   │   └── proxima_search_client.h
│   │   └── src/
│   │       ├── grpc_client.cc
│   │       ├── grpc_client.h
│   │       ├── http_client.cc
│   │       ├── http_client.h
│   │       ├── proxima_search_client.cc
│   │       └── version.h
│   ├── go/
│   │   ├── .gitignore
│   │   ├── README.md
│   │   ├── client_proxy.go
│   │   ├── clients.go
│   │   ├── const.go
│   │   ├── doc.go
│   │   ├── examples/
│   │   │   └── demo/
│   │   │       ├── README.md
│   │   │       ├── example.go
│   │   │       ├── go.mod
│   │   │       └── go.sum
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── interfaces.go
│   │   ├── options.go
│   │   ├── proto/
│   │   │   ├── common.pb.go
│   │   │   ├── config.pb.go
│   │   │   └── proxima_be.pb.go
│   │   ├── status.go
│   │   ├── types.go
│   │   ├── utils.go
│   │   ├── utils_test.go
│   │   └── version.go
│   ├── java/
│   │   ├── README.txt
│   │   ├── example/
│   │   │   ├── pom.xml
│   │   │   └── src/
│   │   │       └── main/
│   │   │           ├── java/
│   │   │           │   └── com/
│   │   │           │       └── alibaba/
│   │   │           │           └── example/
│   │   │           │               ├── BenchClient.java
│   │   │           │               └── TestExample.java
│   │   │           └── resources/
│   │   │               └── log4j2.xml
│   │   ├── pom.xml
│   │   └── src/
│   │       └── main/
│   │           ├── java/
│   │           │   └── com/
│   │           │       └── alibaba/
│   │           │           └── proxima/
│   │           │               └── be/
│   │           │                   └── client/
│   │           │                       ├── CollectionConfig.java
│   │           │                       ├── CollectionInfo.java
│   │           │                       ├── CollectionStats.java
│   │           │                       ├── ConnectParam.java
│   │           │                       ├── DataType.java
│   │           │                       ├── DatabaseRepository.java
│   │           │                       ├── DescribeCollectionResponse.java
│   │           │                       ├── Document.java
│   │           │                       ├── GetDocumentRequest.java
│   │           │                       ├── GetDocumentResponse.java
│   │           │                       ├── GetVersionResponse.java
│   │           │                       ├── IndexColumnParam.java
│   │           │                       ├── IndexType.java
│   │           │                       ├── ListCollectionsResponse.java
│   │           │                       ├── ListCondition.java
│   │           │                       ├── LsnContext.java
│   │           │                       ├── ProtoConverter.java
│   │           │                       ├── ProximaGrpcSearchClient.java
│   │           │                       ├── ProximaSEException.java
│   │           │                       ├── ProximaSearchClient.java
│   │           │                       ├── QueryRequest.java
│   │           │                       ├── QueryResponse.java
│   │           │                       ├── QueryResult.java
│   │           │                       ├── StatsCollectionResponse.java
│   │           │                       ├── Status.java
│   │           │                       └── WriteRequest.java
│   │           ├── proto/
│   │           │   ├── common.proto
│   │           │   └── proxima_be.proto
│   │           └── resources/
│   │               └── proxima-be.properties
│   └── python/
│       ├── docs/
│       │   ├── .gitignore
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── conf.py
│       │   └── index.rst
│       ├── example/
│       │   ├── example.py
│       │   ├── example_async.py
│       │   └── mysql_example.py
│       ├── pyproximabe/
│       │   ├── __init__.py
│       │   ├── core/
│       │   │   ├── __init__.py
│       │   │   ├── client.py
│       │   │   ├── handlers.py
│       │   │   └── types.py
│       │   └── proto/
│       │       └── __init__.py
│       ├── requirements-dev.txt
│       └── requirements.txt
├── src/
│   ├── CMakeLists.txt
│   ├── admin/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── admin_agent.cc
│   │   ├── admin_agent.h
│   │   ├── admin_proto_converter.cc
│   │   └── admin_proto_converter.h
│   ├── agent/
│   │   ├── CMakeLists.txt
│   │   ├── collection_counter.h
│   │   ├── column_order.cc
│   │   ├── column_order.h
│   │   ├── index_agent.cc
│   │   ├── index_agent.h
│   │   └── write_request.h
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── auto_counter.h
│   │   ├── config.cc
│   │   ├── config.h
│   │   ├── defer.h
│   │   ├── error_code.cc
│   │   ├── error_code.h
│   │   ├── glogger.cc
│   │   ├── interface/
│   │   │   └── service.h
│   │   ├── logger.h
│   │   ├── macro_define.h
│   │   ├── profiler.h
│   │   ├── protobuf_helper.cc
│   │   ├── protobuf_helper.h
│   │   ├── sys_logger.cc
│   │   ├── transformer.cc
│   │   ├── transformer.h
│   │   ├── types.h
│   │   ├── types_helper.h
│   │   ├── uuid_helper.cc
│   │   ├── uuid_helper.h
│   │   ├── version.cc
│   │   ├── version.h
│   │   ├── wait_notifier.cc
│   │   └── wait_notifier.h
│   ├── index/
│   │   ├── CMakeLists.txt
│   │   ├── collection.cc
│   │   ├── collection.h
│   │   ├── collection_dataset.cc
│   │   ├── collection_dataset.h
│   │   ├── collection_query.h
│   │   ├── collection_stats.h
│   │   ├── column/
│   │   │   ├── column_indexer.cc
│   │   │   ├── column_indexer.h
│   │   │   ├── column_reader.cc
│   │   │   ├── column_reader.h
│   │   │   ├── context_pool.cc
│   │   │   ├── context_pool.h
│   │   │   ├── forward_data.h
│   │   │   ├── forward_indexer.cc
│   │   │   ├── forward_indexer.h
│   │   │   ├── forward_reader.cc
│   │   │   ├── forward_reader.h
│   │   │   ├── index_helper.cc
│   │   │   ├── index_helper.h
│   │   │   ├── index_provider.h
│   │   │   ├── simple_forward_indexer.cc
│   │   │   ├── simple_forward_indexer.h
│   │   │   ├── simple_forward_reader.cc
│   │   │   ├── simple_forward_reader.h
│   │   │   ├── vector_column_indexer.cc
│   │   │   ├── vector_column_indexer.h
│   │   │   ├── vector_column_reader.cc
│   │   │   └── vector_column_reader.h
│   │   ├── concurrent_bitmap.h
│   │   ├── concurrent_hash_map.h
│   │   ├── constants.h
│   │   ├── delete_store.cc
│   │   ├── delete_store.h
│   │   ├── delta_store.h
│   │   ├── file_helper.h
│   │   ├── id_map.cc
│   │   ├── id_map.h
│   │   ├── index_service.cc
│   │   ├── index_service.h
│   │   ├── lsn_store.cc
│   │   ├── lsn_store.h
│   │   ├── persist_hash_map.h
│   │   ├── segment/
│   │   │   ├── memory_segment.cc
│   │   │   ├── memory_segment.h
│   │   │   ├── persist_segment.cc
│   │   │   ├── persist_segment.h
│   │   │   ├── persist_segment_manager.cc
│   │   │   ├── persist_segment_manager.h
│   │   │   └── segment.h
│   │   ├── snapshot.cc
│   │   ├── snapshot.h
│   │   ├── typedef.h
│   │   ├── version_manager.cc
│   │   ├── version_manager.h
│   │   ├── version_store.cc
│   │   └── version_store.h
│   ├── meta/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── meta.h
│   │   ├── meta_agent.cc
│   │   ├── meta_agent.h
│   │   ├── meta_cache.cc
│   │   ├── meta_cache.h
│   │   ├── meta_impl.cc
│   │   ├── meta_impl.h
│   │   ├── meta_service.cc
│   │   ├── meta_service.h
│   │   ├── meta_service_builder.h
│   │   ├── meta_store.h
│   │   ├── meta_store_factory.cc
│   │   ├── meta_store_factory.h
│   │   ├── meta_types.h
│   │   └── sqlite/
│   │       ├── sqlite_meta_store.cc
│   │       ├── sqlite_meta_store.h
│   │       ├── sqlite_statement.cc
│   │       └── sqlite_statement.h
│   ├── metrics/
│   │   ├── CMakeLists.txt
│   │   ├── bvar_metrics_collector.cc
│   │   ├── bvar_metrics_collector.h
│   │   ├── metrics.h
│   │   ├── metrics_collector.cc
│   │   └── metrics_collector.h
│   ├── proto/
│   │   ├── common.proto
│   │   ├── config.proto
│   │   └── proxima_be.proto
│   ├── query/
│   │   ├── CMakeLists.txt
│   │   ├── README.md
│   │   ├── collection_query.cc
│   │   ├── collection_query.h
│   │   ├── context.h
│   │   ├── equal_query.cc
│   │   ├── equal_query.h
│   │   ├── equal_task.cc
│   │   ├── equal_task.h
│   │   ├── executor/
│   │   │   ├── bthread_queue.cc
│   │   │   ├── bthread_queue.h
│   │   │   ├── bthread_task.cc
│   │   │   ├── bthread_task.h
│   │   │   ├── executor.h
│   │   │   ├── parallel_executor.cc
│   │   │   ├── parallel_executor.h
│   │   │   ├── scheduler.cc
│   │   │   ├── scheduler.h
│   │   │   ├── task.h
│   │   │   └── task_queue.h
│   │   ├── forward_serializer.cc
│   │   ├── forward_serializer.h
│   │   ├── knn_query.cc
│   │   ├── knn_query.h
│   │   ├── knn_task.cc
│   │   ├── knn_task.h
│   │   ├── meta_wrapper.cc
│   │   ├── meta_wrapper.h
│   │   ├── query.h
│   │   ├── query_agent.cc
│   │   ├── query_agent.h
│   │   ├── query_factory.cc
│   │   ├── query_factory.h
│   │   ├── query_service.cc
│   │   ├── query_service.h
│   │   ├── query_service_builder.h
│   │   └── query_types.h
│   ├── repository/
│   │   ├── CMakeLists.txt
│   │   ├── binlog/
│   │   │   ├── CMakeLists.txt
│   │   │   ├── binlog_common.h
│   │   │   ├── binlog_event.cc
│   │   │   ├── binlog_event.h
│   │   │   ├── binlog_reader.cc
│   │   │   ├── binlog_reader.h
│   │   │   ├── event_fetcher.cc
│   │   │   ├── event_fetcher.h
│   │   │   ├── field.cc
│   │   │   ├── field.h
│   │   │   ├── info_fetcher.cc
│   │   │   ├── info_fetcher.h
│   │   │   ├── log_context.h
│   │   │   ├── mysql_connector.cc
│   │   │   ├── mysql_connector.h
│   │   │   ├── mysql_handler.cc
│   │   │   ├── mysql_handler.h
│   │   │   ├── mysql_reader.h
│   │   │   ├── mysql_validator.cc
│   │   │   ├── mysql_validator.h
│   │   │   ├── rows_event_parser.cc
│   │   │   ├── rows_event_parser.h
│   │   │   ├── sql_builder.cc
│   │   │   ├── sql_builder.h
│   │   │   ├── table_reader.cc
│   │   │   ├── table_reader.h
│   │   │   ├── table_schema.cc
│   │   │   └── table_schema.h
│   │   ├── collection.h
│   │   ├── collection_creator.cc
│   │   ├── collection_creator.h
│   │   ├── collection_manager.cc
│   │   ├── collection_manager.h
│   │   ├── common_types.h
│   │   ├── lsn_context_format.cc
│   │   ├── lsn_context_format.h
│   │   ├── main.cc
│   │   ├── mysql_collection.cc
│   │   ├── mysql_collection.h
│   │   ├── mysql_repository.cc
│   │   ├── mysql_repository.h
│   │   ├── proto/
│   │   │   └── repository_config.proto
│   │   └── repository_common/
│   │       ├── CMakeLists.txt
│   │       ├── config.cc
│   │       ├── config.h
│   │       ├── error_code.cc
│   │       ├── error_code.h
│   │       ├── glogger.cc
│   │       ├── logger.h
│   │       ├── version.cc
│   │       └── version.h
│   └── server/
│       ├── CMakeLists.txt
│       ├── grpc_server.cc
│       ├── grpc_server.h
│       ├── http_server.cc
│       ├── http_server.h
│       ├── main.cc
│       ├── proto_converter.cc
│       ├── proto_converter.h
│       ├── proxima_request_handler.cc
│       ├── proxima_request_handler.h
│       ├── proxima_search_engine.cc
│       ├── proxima_search_engine.h
│       ├── write_request_builder.cc
│       └── write_request_builder.h
├── tests/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── admin/
│   │   ├── CMakeLists.txt
│   │   └── admin_proto_converter_test.cc
│   ├── agent/
│   │   ├── CMakeLists.txt
│   │   ├── collection_counter_test.cc
│   │   └── index_agent_test.cc
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── config_test.cc
│   │   ├── profiler_test.cc
│   │   ├── protobuf_helper_test.cc
│   │   ├── test.proto
│   │   ├── transformer_test.cc
│   │   └── types_helper_test.cc
│   ├── index/
│   │   ├── CMakeLists.txt
│   │   ├── collection_test.cc
│   │   ├── column_indexer_test.cc
│   │   ├── column_reader_test.cc
│   │   ├── delete_store_test.cc
│   │   ├── forward_indexer_test.cc
│   │   ├── forward_reader_test.cc
│   │   ├── id_map_test.cc
│   │   ├── index_service_test.cc
│   │   ├── lsn_store_test.cc
│   │   ├── memory_segment_test.cc
│   │   ├── mock_index_service.h
│   │   ├── mock_segment.h
│   │   ├── persist_hash_map_test.cc
│   │   ├── persist_segment_test.cc
│   │   └── version_manager_test.cc
│   ├── integration/
│   │   ├── README.md
│   │   ├── data/
│   │   │   ├── test_clean_db.sql
│   │   │   ├── test_collection_create_and_remove_full.sql
│   │   │   ├── test_forward_date_and_time_frac_full.sql
│   │   │   ├── test_forward_date_and_time_frac_inc.sql
│   │   │   ├── test_forward_date_and_time_full.sql
│   │   │   ├── test_forward_date_and_time_inc.sql
│   │   │   ├── test_forward_numeric_full.sql
│   │   │   ├── test_forward_numeric_inc.sql
│   │   │   ├── test_forward_with_binary_and_varbinary_full.sql
│   │   │   ├── test_forward_with_binary_and_varbinary_inc.sql
│   │   │   ├── test_forward_with_bit_full.sql
│   │   │   ├── test_forward_with_bit_inc.sql
│   │   │   ├── test_forward_with_blob_full.sql
│   │   │   ├── test_forward_with_blob_gbk_full.sql
│   │   │   ├── test_forward_with_blob_gbk_inc.sql
│   │   │   ├── test_forward_with_blob_inc.sql
│   │   │   ├── test_forward_with_char_and_varchar_full.sql
│   │   │   ├── test_forward_with_char_and_varchar_inc.sql
│   │   │   ├── test_forward_with_charset_gbk_full.sql
│   │   │   ├── test_forward_with_charset_gbk_inc.sql
│   │   │   ├── test_forward_with_charset_utf8_full.sql
│   │   │   ├── test_forward_with_charset_utf8_inc.sql
│   │   │   ├── test_forward_with_decimal_full.sql
│   │   │   ├── test_forward_with_decimal_inc.sql
│   │   │   ├── test_forward_with_empty_value_full.sql
│   │   │   ├── test_forward_with_empty_value_inc.sql
│   │   │   ├── test_forward_with_geometry_full.sql
│   │   │   ├── test_forward_with_geometry_inc.sql
│   │   │   ├── test_forward_with_json_full.sql
│   │   │   ├── test_forward_with_json_inc.sql
│   │   │   ├── test_forward_with_set_and_enum_full.sql
│   │   │   ├── test_forward_with_set_and_enum_inc.sql
│   │   │   ├── test_forward_with_text_full.sql
│   │   │   ├── test_forward_with_text_gbk_full.sql
│   │   │   ├── test_forward_with_text_gbk_inc.sql
│   │   │   ├── test_forward_with_text_inc.sql
│   │   │   ├── test_forward_with_types_null_full.sql
│   │   │   ├── test_forward_with_types_null_inc.sql
│   │   │   ├── test_increment_mode_full.sql
│   │   │   ├── test_increment_mode_inc.sql
│   │   │   ├── test_invalid_lsn_info_full.sql
│   │   │   ├── test_invalid_lsn_info_inc.sql
│   │   │   ├── test_multi_collections_full.sql
│   │   │   ├── test_multi_collections_inc.sql
│   │   │   ├── test_mysql_restart_with_create_collection_full.sql
│   │   │   ├── test_mysql_restart_with_full_mode_full.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_full.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_inc_1.sql
│   │   │   ├── test_mysql_restart_with_inc_mode_inc_2.sql
│   │   │   ├── test_one_field_both_index_and_forward_full.sql
│   │   │   ├── test_one_field_both_index_and_forward_inc.sql
│   │   │   ├── test_one_field_both_index_fields_full.sql
│   │   │   ├── test_one_field_both_index_fields_inc.sql
│   │   │   ├── test_proxima_be_restart_full.sql
│   │   │   ├── test_proxima_be_restart_full_1.sql
│   │   │   ├── test_proxima_be_restart_inc.sql
│   │   │   ├── test_proxima_be_restart_inc_1.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_full.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_inc.sql
│   │   │   ├── test_proxima_be_restart_with_collection_empty_meta.sql
│   │   │   ├── test_proxima_be_restart_with_full_stage_full.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_full.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_inc_1.sql
│   │   │   ├── test_proxima_be_restart_with_inc_stage_inc_2.sql
│   │   │   ├── test_repository_restart_full.sql
│   │   │   ├── test_repository_restart_full_1.sql
│   │   │   ├── test_repository_restart_inc.sql
│   │   │   ├── test_repository_restart_inc_1.sql
│   │   │   ├── test_scan_full_table_with_empty_table.sql
│   │   │   ├── test_scan_table.sql
│   │   │   ├── test_suspend_and_resume_collection_full.sql
│   │   │   ├── test_update_collection_full.sql
│   │   │   └── test_update_collection_inc.sql
│   │   ├── run.sh
│   │   ├── script/
│   │   │   ├── restart_proxima_be.sh
│   │   │   ├── restart_repo.sh
│   │   │   ├── run_test.sh
│   │   │   ├── setup_ci.sh
│   │   │   ├── start_mysql.sh
│   │   │   ├── start_proxima_be.sh
│   │   │   └── start_repo.sh
│   │   └── src/
│   │       ├── case/
│   │       │   ├── __init__.py
│   │       │   ├── client_helper.py
│   │       │   ├── collection_creator.py
│   │       │   ├── conf_replacer.py
│   │       │   ├── generate_data.py
│   │       │   ├── global_conf.py
│   │       │   ├── log.py
│   │       │   ├── mysql_client.py
│   │       │   ├── server_utils.py
│   │       │   ├── test_admin_agent.py
│   │       │   ├── test_admin_agent_exception.py
│   │       │   ├── test_index_agent.py
│   │       │   ├── test_index_agent_exception.py
│   │       │   ├── test_mysql_repository.py
│   │       │   ├── test_query_agent.py
│   │       │   └── test_query_agent_exception.py
│   │       ├── requirements.txt
│   │       └── run.py
│   ├── meta/
│   │   ├── CMakeLists.txt
│   │   ├── collection_impl_test.cc
│   │   ├── meta_agent_test.cc
│   │   ├── meta_cache_test.cc
│   │   ├── meta_service_test.cc
│   │   ├── meta_store_factory_test.cc
│   │   ├── mock_meta_service.h
│   │   ├── sqlite_meta_store_test.cc
│   │   ├── statement_test.cc
│   │   └── temp_file_inl.h
│   ├── query/
│   │   ├── CMakeLists.txt
│   │   ├── bthread_queue_test.cc
│   │   ├── equal_query_test.cc
│   │   ├── equal_task_test.cc
│   │   ├── knn_query_test.cc
│   │   ├── knn_task_test.cc
│   │   ├── meta_wrapper_test.cc
│   │   ├── mock_executor.h
│   │   ├── mock_query_context.h
│   │   ├── parallel_executor_test.cc
│   │   ├── query_factory_test.cc
│   │   ├── query_service_test.cc
│   │   ├── scheduler_test.cc
│   │   ├── task-inl.h
│   │   └── task_test.cc
│   ├── repository/
│   │   ├── CMakeLists.txt
│   │   ├── binlog_event_test.cc
│   │   ├── binlog_reader_test.cc
│   │   ├── collection_manager_create_test.cc
│   │   ├── collection_manager_drop_test.cc
│   │   ├── collection_manager_filter_test.cc
│   │   ├── collection_manager_test.cc
│   │   ├── event_builder.h
│   │   ├── event_fetcher_test.cc
│   │   ├── fake_collection.h
│   │   ├── field_test.cc
│   │   ├── info_fetcher_test.cc
│   │   ├── lsn_context_format_test.cc
│   │   ├── mock_collection_creator.h
│   │   ├── mock_index_agent_server.h
│   │   ├── mock_mysql_connector.h
│   │   ├── mock_mysql_handler.h
│   │   ├── mysql_collection_random_test.cc
│   │   ├── mysql_collection_scan_mode_test.cc
│   │   ├── mysql_collection_schema_change_test.cc
│   │   ├── mysql_collection_test.cc
│   │   ├── mysql_handler_test.cc
│   │   ├── mysql_result_builder.h
│   │   ├── mysql_validator_test.cc
│   │   ├── port_helper.h
│   │   ├── repository_test.conf
│   │   ├── rows_event_parser_test.cc
│   │   └── table_reader_test.cc
│   └── server/
│       ├── CMakeLists.txt
│       ├── http_client_test.cc
│       ├── port_helper.h
│       ├── proto_converter_test.cc
│       ├── proxima_search_engine_test.cc
│       └── write_request_builder_test.cc
└── tools/
    ├── CMakeLists.txt
    ├── admin_client.cc
    ├── bench_client.cc
    ├── index_builder.cc
    └── vecs_reader.h
Download .txt
Showing preview only (332K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4068 symbols across 476 files)

FILE: benchmark/common/exceptions.py
  class ProximaSEException (line 22) | class ProximaSEException(Exception):
    method __init__ (line 25) | def __init__(self, message, response_header, response_data):
  class FileNotExits (line 30) | class FileNotExits(ProximaSEException):
    method __init__ (line 31) | def __init__(self, file):
  class PropKeyExceptions (line 36) | class PropKeyExceptions(ProximaSEException):
    method __init__ (line 37) | def __init__(self, key):

FILE: benchmark/common/mysql_utils.py
  class MySQL (line 24) | class MySQL(object):
    method connect_db (line 26) | def connect_db(uri):
    method connect (line 49) | def connect(jdbc_str):
    method close (line 54) | def close(connection):
    method execute (line 58) | def execute(cursor, sql):
    method counts (line 63) | def counts(conn, table):
    method schema (line 69) | def schema(conn, table):
    method tables (line 75) | def tables(conn):

FILE: benchmark/common/proxima2_dataset.py
  class StorageObject (line 29) | class StorageObject(object):
    method __init__ (line 30) | def __init__(self, fmt: str = ''):
    method calcsize (line 33) | def calcsize(self):
    method fmt (line 37) | def fmt(self):
    method pack (line 40) | def pack(self):
    method unpack (line 43) | def unpack(self, buffer, offset=0):
    method json (line 46) | def json(self):
  class DatasetHeader (line 50) | class DatasetHeader(StorageObject):
    method __init__ (line 51) | def __init__(self):
    method __del__ (line 56) | def __del__(self):
    method pack (line 59) | def pack(self):
    method unpack (line 62) | def unpack(self, buffer, offset=0):
    method num_vectors (line 65) | def num_vectors(self):
    method meta_size (line 68) | def meta_size(self):
    method meta_base (line 71) | def meta_base(self):
    method vectors_base (line 74) | def vectors_base(self):
  class MetaHeader (line 78) | class MetaHeader(StorageObject):
    method __init__ (line 79) | def __init__(self):
    method __del__ (line 93) | def __del__(self):
    method pack (line 96) | def pack(self):
    method unpack (line 105) | def unpack(self, buffer, offset=0):
    method header_size (line 113) | def header_size(self):
    method major_order (line 116) | def major_order(self):
    method type (line 119) | def type(self):
    method dimension (line 122) | def dimension(self):
    method unit_size (line 125) | def unit_size(self):
    method space_id (line 128) | def space_id(self):
    method attachment_offset (line 131) | def attachment_offset(self):
    method attachment_size (line 134) | def attachment_size(self):
    method reserve (line 137) | def reserve(self):
    method vector_size (line 140) | def vector_size(self):
  class FeatureTypes (line 144) | class FeatureTypes(IntEnum):
  class ValueTypeHelper (line 157) | class ValueTypeHelper(object):
    method fmt (line 177) | def fmt(cls, value_type: FeatureTypes, counts: int = 1):
    method pack (line 181) | def pack(cls, value_type: FeatureTypes, value) -> bytes:
    method pack_values (line 185) | def pack_values(cls, value_type: FeatureTypes, values):
    method pack_array (line 190) | def pack_array(cls, value_type: FeatureTypes, array) -> bytes:
    method default (line 194) | def default(cls, value_type):
    method default_values (line 198) | def default_values(cls, value_type, counts):
    method default_array (line 203) | def default_array(cls, value_type, counts):
    method precision (line 207) | def precision(cls, value_type):
  class VectorObject (line 211) | class VectorObject(StorageObject):
    method __init__ (line 212) | def __init__(self, value_type: FeatureTypes, counts):
    method pack (line 218) | def pack(self):
    method unpack (line 221) | def unpack(self, buffer, offset=0):
    method vector (line 227) | def vector(self):
  class KeyObject (line 231) | class KeyObject(StorageObject):
    method __init__ (line 232) | def __init__(self):
    method pack (line 236) | def pack(self):
    method unpack (line 239) | def unpack(self, buffer, offset=0):
    method key (line 242) | def key(self):
  class RandomBufferReader (line 246) | class RandomBufferReader(object):
    method __init__ (line 247) | def __init__(self):
    method size (line 250) | def size(self):
    method read (line 253) | def read(self, offset, size):
  class RandomMMapReader (line 257) | class RandomMMapReader(RandomBufferReader):
    method __init__ (line 258) | def __init__(self, vector_file):
    method __del__ (line 263) | def __del__(self):
    method size (line 267) | def size(self):
    method read (line 270) | def read(self, offset, size):
  class RandomFileReader (line 276) | class RandomFileReader(RandomBufferReader):
    method __init__ (line 277) | def __init__(self, vector_file):
    method __del__ (line 282) | def __del__(self):
    method size (line 285) | def size(self):
    method read (line 292) | def read(self, offset, size):
  class Proxima2VectorsReader (line 299) | class Proxima2VectorsReader(object):
    method __init__ (line 300) | def __init__(self, buffer: RandomBufferReader):
    method __del__ (line 309) | def __del__(self):
    method header (line 312) | def header(self):
    method meta (line 315) | def meta(self):
    method num_vectors (line 318) | def num_vectors(self):
    method _load_header (line 321) | def _load_header(self) -> Optional[DatasetHeader]:
    method _load_meta (line 330) | def _load_meta(self) -> Optional[MetaHeader]:
    method _vector_base (line 339) | def _vector_base(self, index):
    method _key_base (line 342) | def _key_base(self, index):
    method load (line 345) | def load(self):
    method unload (line 353) | def unload(self):
    method is_valid (line 356) | def is_valid(self):
    method vector (line 360) | def vector(self, index):
    method _load_keys (line 368) | def _load_keys(self, begin, counts):
    method _cache_range (line 376) | def _cache_range(self):
    method _in_cache (line 379) | def _in_cache(self, index):
    method _load_batch_keys (line 383) | def _load_batch_keys(self, index):
    method key (line 389) | def key(self, index):
  class Proxima2GTRecall (line 399) | class Proxima2GTRecall(object):
    method __init__ (line 405) | def __init__(self, pk=0, score=0.0):
    method __eq__ (line 409) | def __eq__(self, other):
    method calcsize (line 413) | def calcsize(cls):
    method pack (line 416) | def pack(self):
    method unpack (line 419) | def unpack(self, buf, offset=0):
    method is_same_pk (line 423) | def is_same_pk(self, pk):
    method is_same_score (line 426) | def is_same_score(self, score):
    method equals (line 429) | def equals(self, recall):
  class CustomEncoder (line 433) | class CustomEncoder(json.JSONEncoder):
    method default (line 434) | def default(self, x):
  function _default_receiver (line 440) | def _default_receiver(_):
  class Proxima2GTRecord (line 444) | class Proxima2GTRecord(object):
    method __init__ (line 450) | def __init__(self, count=0):
    method dumps (line 454) | def dumps(self):
    method calcsize (line 457) | def calcsize(self):
    method pack (line 460) | def pack(self):
    method unpack (line 464) | def unpack(self, buf, offset=0):
    method count (line 474) | def count(self):
    method record (line 477) | def record(self, pk):
    method recalls (line 480) | def recalls(self, end=sys.maxsize):
    method find (line 485) | def find(self, pk):
    method exists (line 492) | def exists(self, pk):
    method pk_set (line 495) | def pk_set(self, end=sys.maxsize):
    method score_set (line 499) | def score_set(self, end=sys.maxsize):
    method score_list (line 502) | def score_list(self, end=sys.maxsize):
    method append (line 506) | def append(self, record):
    method filter_pk (line 510) | def filter_pk(self, record, nums, receiver=_default_receiver):
    method filter_pk_not_in (line 520) | def filter_pk_not_in(self, record, nums, receiver=_default_receiver):
    method _score_in_list (line 530) | def _score_in_list(self, score, array):
    method _score_list_and (line 538) | def _score_list_and(self, left, right):
    method filter_score (line 545) | def filter_score(self, record, nums, receiver=_default_receiver):
    method filter_score_not_in (line 556) | def filter_score_not_in(self, record, nums, receiver=_default_receiver):
    method __and__ (line 567) | def __and__(self, other):
    method __or__ (line 570) | def __or__(self, other):
  class Proxima2GT (line 574) | class Proxima2GT(object):
    method __init__ (line 580) | def __init__(self, gt_counts, gt_file, skip_magic=True):
    method __del__ (line 586) | def __del__(self):
    method load (line 589) | def load(self):
    method unload (line 605) | def unload(self):
    method records (line 608) | def records(self):
    method record (line 612) | def record(self, idx):
    method counts (line 617) | def counts(self):
    method append (line 620) | def append(self, record):
    method serialize (line 623) | def serialize(self):

FILE: benchmark/common/proxima_be_query.py
  function _parse_int (line 24) | def _parse_int(string):
  function _parse_float (line 28) | def _parse_float(string):
  function _parse_none (line 32) | def _parse_none(_):
  class QuerySet (line 36) | class QuerySet(object):
    method __init__ (line 37) | def __init__(self):
    method init (line 40) | def init(self) -> bool:
    method cleanup (line 43) | def cleanup(self) -> bool:
    method counts (line 46) | def counts(self) -> int:
    method queries (line 49) | def queries(self, start=0, end=sys.maxsize):
    method query (line 52) | def query(self, start=0, counts=1):
  class MysqlRawQuerySet (line 56) | class MysqlRawQuerySet(QuerySet):
    method __init__ (line 57) | def __init__(self, uri, table, collection):
    method __del__ (line 64) | def __del__(self):
    method _columns (line 67) | def _columns(self):
    method counts (line 70) | def counts(self) -> int:
    method queries (line 73) | def queries(self, start=0, end=sys.maxsize):
    method query (line 85) | def query(self, start=0, counts=1):
  class MysqlRawQuerySetCache (line 92) | class MysqlRawQuerySetCache(MysqlRawQuerySet):
    method __init__ (line 93) | def __init__(self, uri, table, collection):
    method __len__ (line 99) | def __len__(self):
    method __getitem__ (line 102) | def __getitem__(self, item):
    method counts (line 106) | def counts(self) -> int:
    method init (line 111) | def init(self) -> bool:
    method cleanup (line 121) | def cleanup(self) -> bool:
    method queries (line 124) | def queries(self, start=0, end=sys.maxsize):
    method query (line 128) | def query(self, start=0, counts=1):
    method dimension (line 133) | def dimension(self):

FILE: benchmark/common/proxima_be_repo.py
  class ProximaSERepoSource (line 21) | class ProximaSERepoSource(object):
    method __init__ (line 22) | def __init__(self, jdbc):
    method __del__ (line 25) | def __del__(self):
    method jdbc_str (line 28) | def jdbc_str(self):
    method is_valid (line 31) | def is_valid(self) -> bool:
    method tables (line 34) | def tables(self):
    method schema (line 37) | def schema(self, table):
    method counts (line 40) | def counts(self, table):
  class MysqlRepoSource (line 44) | class MysqlRepoSource(ProximaSERepoSource):
    method __init__ (line 45) | def __init__(self, jdbc, table):
    method __del__ (line 51) | def __del__(self):
    method __enter__ (line 54) | def __enter__(self):
    method __exit__ (line 59) | def __exit__(self, exc_type, exc_val, exc_tb):
    method is_valid (line 64) | def is_valid(self) -> bool:
    method tables (line 67) | def tables(self):
    method schema (line 70) | def schema(self, table=None):
    method counts (line 74) | def counts(self, table=None):

FILE: benchmark/common/proxima_be_service.py
  class ServiceListener (line 38) | class ServiceListener(object):
    method on_failed (line 39) | def on_failed(self, name) -> bool:
    method on_finished (line 43) | def on_finished(self, name) -> bool:
  class ServiceStatus (line 48) | class ServiceStatus(IntEnum):
  class ProximaSEService (line 56) | class ProximaSEService(object):
    method __init__ (line 57) | def __init__(self, service_name, working_dir, listener):
    method __del__ (line 62) | def __del__(self):
    method write_config_file (line 66) | def write_config_file(config_file, config):
    method write_file (line 72) | def write_file(config_file, config):
    class Stats (line 76) | class Stats(object):
      method __init__ (line 77) | def __init__(self, cpu=0, memory=0):
      method cpu (line 81) | def cpu(self):
      method memory_in_bytes (line 84) | def memory_in_bytes(self):
      method memory_in_kb (line 87) | def memory_in_kb(self):
      method memory_in_mb (line 90) | def memory_in_mb(self):
      method memory_in_gb (line 93) | def memory_in_gb(self):
    method service_name (line 96) | def service_name(self):
    method working_dir (line 99) | def working_dir(self):
    method listener (line 102) | def listener(self):
    method init (line 105) | def init(self) -> bool:
    method cleanup (line 108) | def cleanup(self) -> bool:
    method start (line 111) | def start(self) -> bool:
    method stop (line 114) | def stop(self) -> bool:
    method stdout_log (line 117) | def stdout_log(self) -> str:
    method stderr_log (line 120) | def stderr_log(self) -> str:
    method status (line 123) | def status(self) -> ServiceStatus:
    method service_addr (line 126) | def service_addr(self) -> str:
    method stats (line 129) | def stats(self) -> Stats:
  class LogHandler (line 133) | class LogHandler(object):
    method on_stdin (line 134) | def on_stdin(self, msg):
    method on_stderr (line 137) | def on_stderr(self, msg):
  class LoggingMonitor (line 141) | class LoggingMonitor(threading.Thread):
    method __init__ (line 142) | def __init__(self, process, handler, interval=0.01):
    method run (line 152) | def run(self):
    method stop (line 165) | def stop(self):
  class ProximaSEBaseService (line 169) | class ProximaSEBaseService(ProximaSEService, LogHandler):
    method __init__ (line 170) | def __init__(self, service_name, binary, config, working_dir, listener...
    method __del__ (line 180) | def __del__(self):
    method init (line 184) | def init(self) -> bool:
    method _remove_log (line 201) | def _remove_log(log):
    method cleanup (line 205) | def cleanup(self) -> bool:
    method start (line 213) | def start(self) -> bool:
    method stop (line 216) | def stop(self) -> bool:
    method running (line 241) | def running(self):
    method status (line 244) | def status(self) -> ServiceStatus:
    method service_addr (line 256) | def service_addr(self) -> str:
    method _write_log (line 259) | def _write_log(self, msg):
    method on_stdin (line 263) | def on_stdin(self, msg):
    method on_stderr (line 266) | def on_stderr(self, msg):
    method stats (line 269) | def stats(self) -> ProximaSEService.Stats:
  function _read_int_value (line 273) | def _read_int_value(key, default, **kwargs):
  function _read_str_value (line 277) | def _read_str_value(key, default, **kwargs):
  class ProximaSEMysqlRepo (line 281) | class ProximaSEMysqlRepo(ProximaSEBaseService):
    method __init__ (line 282) | def __init__(self, binary, config, working_dir, listener=ServiceListen...
    method build_config (line 287) | def build_config(**kwargs):
    method build_config_file (line 305) | def build_config_file(config_file, **kwargs):
    method start (line 309) | def start(self) -> bool:
    method stdout_log (line 323) | def stdout_log(self) -> str:
    method stderr_log (line 326) | def stderr_log(self) -> str:
    method on_stdin (line 329) | def on_stdin(self, msg):
    method on_stderr (line 332) | def on_stderr(self, msg):
  class ProximaSEBVarService (line 336) | class ProximaSEBVarService(object):
    method process_stat (line 338) | def process_stat(address) -> ProximaSEService.Stats:
    method api_status (line 353) | def api_status(address):
  class ProximaSE (line 365) | class ProximaSE(ProximaSEBaseService):
    method __init__ (line 366) | def __init__(self, binary, config, working_dir, listener=ServiceListen...
    method build_meta_file (line 372) | def build_meta_file(meta_file=None):
    method build_config (line 377) | def build_config(**kwargs):
    method build_config_file (line 393) | def build_config_file(config_file, **kwargs):
    method stdout_log (line 397) | def stdout_log(self) -> str:
    method stderr_log (line 400) | def stderr_log(self) -> str:
    method start (line 403) | def start(self) -> bool:
    method stop (line 419) | def stop(self) -> bool:
    method on_stderr (line 426) | def on_stderr(self, msg):
    method service_addr (line 430) | def service_addr(self) -> str:
    method stats (line 437) | def stats(self) -> ProximaSEService.Stats:

FILE: benchmark/common/runner.py
  class ShellRunner (line 26) | class ShellRunner(object):
    method read_output (line 28) | def read_output(fd):
    method readable (line 35) | def readable(fd):
    method aync_execute (line 42) | def aync_execute(args):
    method execute2 (line 50) | def execute2(args):
    method execute (line 63) | def execute(args, timeout=10):
  class ShellCommand (line 100) | class ShellCommand(object):
    method __init__ (line 101) | def __init__(self, cmd):
    method execute (line 106) | def execute(self, *args):
    method execute2 (line 109) | def execute2(self, *args):

FILE: benchmark/scripts/build_bench.py
  class BenchContext (line 58) | class BenchContext(object):
    method __init__ (line 59) | def __init__(self, output_dir, kwargs):
    method output (line 94) | def output(self):
    method options (line 97) | def options(self):
    method repository (line 100) | def repository(self):
    method table (line 103) | def table(self):
    method counts (line 106) | def counts(self):
    method meta_dir (line 109) | def meta_dir(self):
    method indices_dir (line 112) | def indices_dir(self):
    method log_dir (line 115) | def log_dir(self):
    method proxima_se_log_dir (line 118) | def proxima_se_log_dir(self):
    method repository_log_dir (line 121) | def repository_log_dir(self):
    method timeout_in_seconds (line 124) | def timeout_in_seconds(self):
    method output_flush_interval (line 127) | def output_flush_interval(self):
    method config_dir (line 130) | def config_dir(self):
    method proxima_se_config (line 133) | def proxima_se_config(self):
    method repository_config (line 138) | def repository_config(self):
    method proxima_se_config_file (line 141) | def proxima_se_config_file(self):
    method proxima_se_repo_config_file (line 144) | def proxima_se_repo_config_file(self):
    method proxima_se_admin_address (line 147) | def proxima_se_admin_address(self):
    method max_docs_per_segment (line 150) | def max_docs_per_segment(self):
    method dimension (line 153) | def dimension(self):
    method report_file (line 156) | def report_file(self):
    method _init_bench_config (line 159) | def _init_bench_config(self):
    method _create_directory (line 178) | def _create_directory(directory):
    method _init_output_dir (line 182) | def _init_output_dir(self):
    method _init_report (line 198) | def _init_report(self):
    method init (line 209) | def init(self):
    method _cleanup_dir (line 223) | def _cleanup_dir(directory):
    method cleanup (line 227) | def cleanup(self):
  class ProximaSEBuilds (line 238) | class ProximaSEBuilds(object):
    method __init__ (line 239) | def __init__(self, roots):
    method proxima_se_binary (line 249) | def proxima_se_binary(self):
    method proxima_repo_binary (line 252) | def proxima_repo_binary(self):
    method is_valid (line 255) | def is_valid(self):
  function _timeout_monitor (line 260) | def _timeout_monitor(stopped, timeout, interval):
  function _service_stopped_monitor (line 274) | def _service_stopped_monitor(stopped, interval, *args):
  function _progress_monitor (line 286) | def _progress_monitor(stopped, callback, total, interval, notifier):
  class ProximaSEBuildBench (line 320) | class ProximaSEBuildBench(object):
    method __init__ (line 323) | def __init__(self, output_dir, arg_options):
    method human_number (line 340) | def human_number(num):
    method summary_report (line 350) | def summary_report(progress, report_file):
    method summary_reports (line 368) | def summary_reports(progress, interval, *reports):
    method init (line 380) | def init(self):
    method cleanup (line 407) | def cleanup(self):
    method _max_lsn (line 416) | def _max_lsn(self):
    method _collection_docs (line 429) | def _collection_docs(self):
    method _collection_index_size (line 437) | def _collection_index_size(self):
    method _report_progress (line 445) | def _report_progress(self, progress, qps, seconds, rtqps):
    method _start_monitors (line 454) | def _start_monitors(self):
    method start (line 465) | def start(self):
    method stop (line 476) | def stop(self):
    method _valid_schema (line 482) | def _valid_schema(self):
    method _build_repository_config (line 492) | def _build_repository_config(self):
    method _build_forward_metas (line 497) | def _build_forward_metas(self, schema):
    method _build_column_metas (line 501) | def _build_column_metas(self):
    method _build_collection_meta (line 505) | def _build_collection_meta(self, schema):
    method sync_schema (line 513) | def sync_schema(self):
    method has_monitor_finished (line 525) | def has_monitor_finished(self):
    method wait_finish (line 532) | def wait_finish(self):
    method summary (line 540) | def summary(self):
    method output_report (line 546) | def output_report(self):
  function opt_parser (line 551) | def opt_parser():
  function handle_help_and_exit (line 595) | def handle_help_and_exit(arg_options, arg_parser, nargs):

FILE: benchmark/scripts/query_bench.py
  class Counter (line 34) | class Counter(object):
    method __init__ (line 35) | def __init__(self):
    method counts (line 38) | def counts(self):
    method _sum (line 41) | def _sum(self):
    method avg (line 44) | def avg(self):
    method min (line 48) | def min(self):
    method max (line 51) | def max(self):
    method clear (line 54) | def clear(self):
    method append (line 57) | def append(self, c):
  class PerfRecord (line 62) | class PerfRecord(object):
    method __init__ (line 63) | def __init__(self):
  class BenchContext (line 73) | class BenchContext(object):
    method __init__ (line 74) | def __init__(self, opts):
    method _proto (line 85) | def _proto(self):
    method init (line 88) | def init(self):
    method cleanup (line 106) | def cleanup(self):
    method is_valid (line 113) | def is_valid(self):
    method query (line 116) | def query(self):
    method create_client (line 119) | def create_client(self):
    method create_async_client (line 122) | def create_async_client(self):
    method collection (line 127) | def collection(self):
    method column (line 130) | def column(self, idx=0):
    method topk (line 133) | def topk(self):
    method success (line 136) | def success(self, latency):
    method failure (line 141) | def failure(self, _):
    method get_report_and_cleanup (line 145) | def get_report_and_cleanup(self):
  function opt_parser (line 161) | def opt_parser():
  class BenchWorker (line 188) | class BenchWorker(object):
    method __init__ (line 189) | def __init__(self, bench_context):
    method __call__ (line 201) | def __call__(self, *_, **__):
  class ProgressMonitor (line 246) | class ProgressMonitor(object):
    method __init__ (line 247) | def __init__(self, bench_context, interval):
    method __call__ (line 252) | def __call__(self, *_, **__):
  function handle_help_and_exit (line 261) | def handle_help_and_exit(arg_options, arg_parser, nargs):

FILE: benchmark/scripts/recall.py
  class RecallContext (line 28) | class RecallContext(object):
    method __init__ (line 29) | def __init__(self, recall_options):
    method init (line 37) | def init(self):
    method is_valid (line 61) | def is_valid(self):
    method client (line 66) | def client(self):
    method topk (line 69) | def topk(self):
    method max_topk (line 72) | def max_topk(self):
    method gt_count (line 75) | def gt_count(self):
    method host (line 78) | def host(self):
    method sample_counts (line 81) | def sample_counts(self):
    method load_gt (line 84) | def load_gt(self):
    method query (line 89) | def query(self, idx):
    method collection (line 93) | def collection(self):
    method column (line 96) | def column(self):
    method ef (line 99) | def ef(self):
  function opt_parser (line 105) | def opt_parser():
  function handle_help_and_exit (line 126) | def handle_help_and_exit(arg_options, arg_parser, nargs):
  class ProximaSERecall (line 134) | class ProximaSERecall(Proxima2GTRecall):
    method __init__ (line 135) | def __init__(self, doc):
  class ProximaSERecallEncoder (line 140) | class ProximaSERecallEncoder(json.JSONEncoder):
    method default (line 141) | def default(self, x):
  function _se_recall_record (line 149) | def _se_recall_record(r_context, feature, linear=False):
  function _diff_ground_truth (line 165) | def _diff_ground_truth(gt_context, mismatch_handler):
  function _print_header (line 180) | def _print_header(topk):
  function _print_summary (line 184) | def _print_summary(topk, ef, summary):
  class BatchRecall (line 194) | class BatchRecall(object):
    method __init__ (line 195) | def __init__(self, recall_context, start, end, mismatch_handler, repor...
    method __del__ (line 203) | def __del__(self):
    method run_one (line 207) | def run_one(rc_context, idx, mismatch_handler):
    method run (line 226) | def run(self):
  function _recall (line 239) | def _recall(recall_context, mismatch_handler):
  function _skipped_handler (line 267) | def _skipped_handler(*_):
  function _dump_mismatch (line 271) | def _dump_mismatch(idx, topk, records):

FILE: benchmark/scripts/vec2txt.py
  function opt_parser (line 24) | def opt_parser():
  function handle_help_and_exit (line 35) | def handle_help_and_exit(arg_options, arg_parser, nargs):
  class VectorWriter (line 44) | class VectorWriter(object):
    method __init__ (line 45) | def __init__(self):
    method write (line 48) | def write(self, key, vector):
  class SQLWriter (line 52) | class SQLWriter(VectorWriter):
    method __init__ (line 53) | def __init__(self):
    method write (line 56) | def write(self, key, vector):
  class RawWriter (line 60) | class RawWriter(VectorWriter):
    method __init__ (line 61) | def __init__(self, output, segment):
    method __del__ (line 69) | def __del__(self):
    method _close_segment (line 72) | def _close_segment(self):
    method _segment_name (line 77) | def _segment_name(self):
    method _open_segment (line 80) | def _open_segment(self):
    method write (line 85) | def write(self, key, vector):

FILE: benchmark/sql/create_table.sql
  type vts_face_fp32_512d (line 7) | create table vts_face_fp32_512d (
  type vts_face_fp32_512d_2w (line 76) | create table vts_face_fp32_512d_2w (
  type vts_face_fp32_512d_1m (line 89) | create table vts_face_fp32_512d_1m (
  type chinese_address_512d_l2_norm (line 118) | create table chinese_address_512d_l2_norm (
  type chinese_address_512d_l2_norm_q (line 247) | create table chinese_address_512d_l2_norm_q (

FILE: benchmark/tests/service_test.py
  function test_proxima_se_service (line 22) | def test_proxima_se_service(service: ProximaSEService):
  function test_mysql_repo (line 49) | def test_mysql_repo():
  function test_proxima_se (line 54) | def test_proxima_se():

FILE: deps/proxima/include/ailego/algorithm/rate_limiter.h
  type RateLimiter (line 32) | struct RateLimiter {
  function virtual (line 80) | virtual ~BurstyRateLimiter(void) {}
  function get_rate (line 92) | double get_rate(void) const override {
  function acquire (line 97) | double acquire(void) override {
  function try_acquire (line 102) | bool try_acquire(void) override {
  function permits_per_usec_ (line 124) | double permits_per_usec_{0.0};

FILE: deps/proxima/include/ailego/container/bitmap.h
  function namespace (line 28) | namespace ailego {

FILE: deps/proxima/include/ailego/container/cube.h
  function namespace (line 29) | namespace ailego {
  function class (line 172) | class Cube {
  type EmptyPolicy (line 398) | struct EmptyPolicy {}

FILE: deps/proxima/include/ailego/container/heap.h
  function namespace (line 30) | namespace ailego {
  function swap (line 82) | void swap(Heap &rhs) {
  function pop (line 88) | void pop(void) {
  function push (line 113) | void push(const T &val) {
  function push (line 126) | void push(T &&val) {
  function limit (line 139) | size_t limit(void) const {
  function limit (line 144) | void limit(size_t max) {
  function unlimit (line 150) | void unlimit(void) {
  function full (line 155) | bool full(void) const {
  function update (line 160) | void update(void) {
  function sort (line 168) | void sort(void) {
  function const (line 213) | bool operator()(const std::pair<TKey, TValue> &lhs,

FILE: deps/proxima/include/ailego/container/hypercube.h
  function namespace (line 28) | namespace ailego {
  function clear (line 151) | void clear(void) {
  function swap (line 156) | void swap(Hypercube &rhs) {
  function erase (line 161) | bool erase(const std::string &key) {
  function get (line 171) | bool get(const std::string &key, Cube *out) const {
  function Cube (line 181) | Cube *get(const std::string &key) {
  function Cube (line 190) | const Cube *get(const std::string &key) const {
  function merge (line 236) | void merge(const Hypercube &rhs) {

FILE: deps/proxima/include/ailego/container/vector.h
  function namespace (line 29) | namespace ailego {
  function ValueType (line 163) | const ValueType &operator[](size_t i) const {
  function append (line 174) | void append(std::initializer_list<ValueType> il) {
  function assign (line 181) | void assign(const ValueType *vec, size_t len) {
  function assign (line 186) | void assign(size_t n, const ValueType &val) {
  function assign (line 192) | void assign(std::initializer_list<ValueType> il) {
  function class (line 326) | class const_iterator {
  function ValueType (line 384) | ValueType operator*() const {
  function NibbleVector (line 394) | NibbleVector(void) : TBase() {}
  function explicit (line 397) | explicit NibbleVector(size_t dim) : TBase() {
  function TBase (line 407) | NibbleVector(const NibbleVector &rhs) : TBase(rhs) {}
  function TBase (line 413) | NibbleVector(const TBase &rhs) : TBase(rhs) {}
  function assign (line 490) | void assign(size_t n, ValueType val) {
  function assign (line 496) | void assign(std::initializer_list<ValueType> il) {
  function StoreType (line 550) | const StoreType *data(void) const {
  function empty (line 555) | bool empty(void) const {
  function const_iterator (line 560) | const_iterator end(void) const {
  function ValueType (line 565) | ValueType front(void) const {
  function reserve (line 570) | void reserve(size_t n) {
  function resize (line 576) | void resize(size_t n) {
  function resize (line 582) | void resize(size_t n, ValueType val) {
  function size (line 589) | size_t size(void) const {
  function dimension (line 594) | size_t dimension(void) const {
  function bytes (line 599) | size_t bytes(void) const {
  function swap (line 604) | void swap(NibbleVector &vec) {
  function class (line 636) | class const_iterator {
  function BinaryVector (line 704) | BinaryVector(void) : TBase() {}
  function explicit (line 707) | explicit BinaryVector(size_t dim) : TBase() {
  function TBase (line 717) | BinaryVector(const BinaryVector &rhs) : TBase(rhs) {}
  function TBase (line 723) | BinaryVector(const TBase &rhs) : TBase(rhs) {
  function assign (line 796) | void assign(size_t n, bool val) {
  function assign (line 802) | void assign(std::initializer_list<bool> il) {
  function ValueType (line 866) | const ValueType *data(void) const {
  function empty (line 871) | bool empty(void) const {
  function const_iterator (line 876) | const_iterator end(void) const {
  function front (line 881) | bool front(void) const {
  function reserve (line 886) | void reserve(size_t n) {
  function resize (line 892) | void resize(size_t n) {
  function resize (line 898) | void resize(size_t n, bool val) {
  function size (line 905) | size_t size(void) const {
  function dimension (line 910) | size_t dimension(void) const {
  function bytes (line 915) | size_t bytes(void) const {
  function swap (line 920) | void swap(BinaryVector &vec) {

FILE: deps/proxima/include/ailego/container/vector_array.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/debug/bug_report.h
  function namespace (line 32) | namespace ailego {

FILE: deps/proxima/include/ailego/debug/symbol_table.h
  function namespace (line 28) | namespace ailego {

FILE: deps/proxima/include/ailego/encoding/base64.h
  function namespace (line 27) | namespace ailego {

FILE: deps/proxima/include/ailego/encoding/json/mod_json.h
  type mod_json_type (line 42) | enum mod_json_type {
  type mod_json_state (line 54) | enum mod_json_state {
  type mod_json_error (line 70) | enum mod_json_error {
  type mod_json_event (line 88) | enum mod_json_event {
  type mod_json_size_t (line 99) | typedef unsigned int mod_json_size_t;
  type mod_json_ssize_t (line 100) | typedef int mod_json_ssize_t;
  type mod_json_boolean_t (line 101) | typedef bool mod_json_boolean_t;
  type mod_json_char_t (line 102) | typedef char mod_json_char_t;
  type mod_json_cchar_t (line 103) | typedef const char mod_json_cchar_t;
  type mod_json_uchar_t (line 104) | typedef unsigned char mod_json_uchar_t;
  type mod_json_integer_t (line 105) | typedef long long mod_json_integer_t;
  type mod_json_float_t (line 106) | typedef double mod_json_float_t;
  type mod_json_void_t (line 107) | typedef void mod_json_void_t;
  type mod_json_type_t (line 108) | typedef enum mod_json_type mod_json_type_t;
  type mod_json_any_t (line 109) | typedef union mod_json_any mod_json_any_t;
  type mod_json_value_t (line 110) | typedef struct mod_json_value mod_json_value_t;
  type mod_json_string_t (line 111) | typedef struct mod_json_string mod_json_string_t;
  type mod_json_array_t (line 112) | typedef struct mod_json_array mod_json_array_t;
  type mod_json_object_t (line 113) | typedef struct mod_json_object mod_json_object_t;
  type mod_json_pair_t (line 114) | typedef struct mod_json_pair mod_json_pair_t;
  type mod_json_option_t (line 115) | typedef struct mod_json_option mod_json_option_t;
  type mod_json_state_t (line 116) | typedef enum mod_json_state mod_json_state_t;
  type mod_json_error_t (line 117) | typedef enum mod_json_error mod_json_error_t;
  type mod_json_event_t (line 118) | typedef enum mod_json_event mod_json_event_t;
  type mod_json_token_t (line 119) | typedef struct mod_json_token mod_json_token_t;
  type mod_json_value (line 139) | struct mod_json_value {
  type mod_json_string (line 147) | struct mod_json_string {
  type mod_json_array (line 156) | struct mod_json_array {
  type mod_json_pair (line 165) | struct mod_json_pair {
  type mod_json_object (line 172) | struct mod_json_object {
  type mod_json_option (line 186) | struct mod_json_option {
  function mod_json_value_t (line 398) | static inline mod_json_value_t *mod_json_value_get(mod_json_value_t *val) {
  function mod_json_ssize_t (line 408) | static inline mod_json_ssize_t mod_json_value_put(mod_json_value_t *val) {
  function mod_json_ssize_t (line 417) | static inline mod_json_ssize_t mod_json_value_refer(mod_json_value_t *va...
  function mod_json_value_set_leaked (line 425) | static inline void mod_json_value_set_leaked(mod_json_value_t *val) {
  function mod_json_boolean_t (line 434) | static inline mod_json_boolean_t mod_json_value_is_leaked(
  function mod_json_boolean_t (line 444) | static inline mod_json_boolean_t mod_json_value_is_shared(
  function mod_json_value_t (line 454) | static inline mod_json_value_t *mod_json_value_grab(mod_json_value_t *va...
  function mod_json_type_t (line 467) | static inline mod_json_type_t mod_json_value_type(mod_json_value_t *val) {
  function mod_json_boolean_t (line 476) | static inline mod_json_boolean_t mod_json_value_is_null(mod_json_value_t...
  function mod_json_boolean_t (line 485) | static inline mod_json_boolean_t mod_json_value_is_array(
  function mod_json_boolean_t (line 495) | static inline mod_json_boolean_t mod_json_value_is_object(
  function mod_json_boolean_t (line 505) | static inline mod_json_boolean_t mod_json_value_is_string(
  function mod_json_boolean_t (line 515) | static inline mod_json_boolean_t mod_json_value_is_float(
  function mod_json_boolean_t (line 525) | static inline mod_json_boolean_t mod_json_value_is_boolean(
  function mod_json_boolean_t (line 535) | static inline mod_json_boolean_t mod_json_value_is_integer(
  function mod_json_string_t (line 572) | static inline mod_json_string_t *mod_json_string_clone(mod_json_string_t...
  function mod_json_string_t (line 656) | static inline mod_json_string_t *mod_json_string_get(mod_json_string_t *...
  function mod_json_ssize_t (line 666) | static inline mod_json_ssize_t mod_json_string_put(mod_json_string_t *st...
  function mod_json_ssize_t (line 675) | static inline mod_json_ssize_t mod_json_string_refer(mod_json_string_t *...
  function mod_json_string_set_leaked (line 683) | static inline void mod_json_string_set_leaked(mod_json_string_t *str) {
  function mod_json_boolean_t (line 692) | static inline mod_json_boolean_t mod_json_string_is_leaked(
  function mod_json_boolean_t (line 702) | static inline mod_json_boolean_t mod_json_string_is_shared(
  function mod_json_string_t (line 712) | static inline mod_json_string_t *mod_json_string_grab(mod_json_string_t ...
  function mod_json_cchar_t (line 725) | static inline mod_json_cchar_t *mod_json_string_cstr(mod_json_string_t *...
  function mod_json_char_t (line 734) | static inline mod_json_char_t *mod_json_string_data(mod_json_string_t *s...
  function mod_json_size_t (line 743) | static inline mod_json_size_t mod_json_string_capacity(mod_json_string_t...
  function mod_json_size_t (line 752) | static inline mod_json_size_t mod_json_string_length(mod_json_string_t *...
  function mod_json_boolean_t (line 761) | static inline mod_json_boolean_t mod_json_string_empty(mod_json_string_t...
  function mod_json_array_t (line 805) | static inline mod_json_array_t *mod_json_array_set_default(void) {
  function mod_json_array_t (line 814) | static inline mod_json_array_t *mod_json_array_get(mod_json_array_t *arr) {
  function mod_json_ssize_t (line 824) | static inline mod_json_ssize_t mod_json_array_put(mod_json_array_t *arr) {
  function mod_json_ssize_t (line 833) | static inline mod_json_ssize_t mod_json_array_refer(mod_json_array_t *ar...
  function mod_json_array_set_leaked (line 841) | static inline void mod_json_array_set_leaked(mod_json_array_t *arr) {
  function mod_json_boolean_t (line 850) | static inline mod_json_boolean_t mod_json_array_is_leaked(
  function mod_json_boolean_t (line 860) | static inline mod_json_boolean_t mod_json_array_is_shared(
  function mod_json_array_t (line 870) | static inline mod_json_array_t *mod_json_array_grab(mod_json_array_t *ar...
  function mod_json_size_t (line 883) | static inline mod_json_size_t mod_json_array_count(mod_json_array_t *arr) {
  function mod_json_size_t (line 892) | static inline mod_json_size_t mod_json_array_capacity(mod_json_array_t *...
  function mod_json_boolean_t (line 901) | static inline mod_json_boolean_t mod_json_array_empty(mod_json_array_t *...
  function mod_json_value_t (line 910) | static inline mod_json_value_t **mod_json_array_begin(mod_json_array_t *...
  function mod_json_value_t (line 919) | static inline mod_json_value_t **mod_json_array_rbegin(mod_json_array_t ...
  function mod_json_value_t (line 928) | static inline mod_json_value_t **mod_json_array_end(mod_json_array_t *ar...
  function mod_json_value_t (line 937) | static inline mod_json_value_t **mod_json_array_rend(mod_json_array_t *a...
  function mod_json_string_t (line 1007) | static inline mod_json_string_t *mod_json_pair_key(mod_json_pair_t *pair) {
  function mod_json_value_t (line 1016) | static inline mod_json_value_t *mod_json_pair_value(mod_json_pair_t *pai...
  function mod_json_object_t (line 1059) | static inline mod_json_object_t *mod_json_object_set_default(void) {
  function mod_json_object_t (line 1068) | static inline mod_json_object_t *mod_json_object_get(mod_json_object_t *...
  function mod_json_ssize_t (line 1078) | static inline mod_json_ssize_t mod_json_object_put(mod_json_object_t *ob...
  function mod_json_ssize_t (line 1087) | static inline mod_json_ssize_t mod_json_object_refer(mod_json_object_t *...
  function mod_json_object_set_leaked (line 1095) | static inline void mod_json_object_set_leaked(mod_json_object_t *obj) {
  function mod_json_boolean_t (line 1104) | static inline mod_json_boolean_t mod_json_object_is_leaked(
  function mod_json_boolean_t (line 1114) | static inline mod_json_boolean_t mod_json_object_is_shared(
  function mod_json_object_t (line 1124) | static inline mod_json_object_t *mod_json_object_grab(mod_json_object_t ...
  function mod_json_size_t (line 1137) | static inline mod_json_size_t mod_json_object_count(mod_json_object_t *o...
  function mod_json_boolean_t (line 1146) | static inline mod_json_boolean_t mod_json_object_empty(mod_json_object_t...
  function mod_json_pair_t (line 1155) | static inline mod_json_pair_t *mod_json_object_begin(mod_json_object_t *...
  function mod_json_pair_t (line 1164) | static inline mod_json_pair_t *mod_json_object_rbegin(mod_json_object_t ...
  function mod_json_pair_t (line 1173) | static inline mod_json_pair_t *mod_json_object_end(mod_json_object_t *ob...
  function mod_json_pair_t (line 1182) | static inline mod_json_pair_t *mod_json_object_rend(mod_json_object_t *o...

FILE: deps/proxima/include/ailego/encoding/json/mod_json_plus.h
  function namespace (line 30) | namespace ailego {
  function const (line 142) | const char &operator[](size_type n) const {
  function is_valid (line 147) | bool is_valid(void) const {
  function empty (line 152) | bool empty(void) const {
  function assign (line 157) | void assign(const JsonString &rhs) {
  function assign (line 164) | void assign(JsonString &&rhs) {
  function assign (line 172) | void assign(const char *cstr) {
  function assign (line 183) | void assign(const char *cstr, size_type len) {
  function assign (line 190) | void assign(const std::string &str) {
  function append (line 199) | void append(const JsonString &str) {
  function append (line 208) | void append(const char *cstr) {
  function append (line 219) | void append(const char *cstr, size_type len) {
  function append (line 226) | void append(const std::string &str) {
  function append (line 235) | void append(char c) {
  function at (line 242) | char &at(size_type n) {
  function at (line 253) | const char &at(size_type n) const {
  function reserve (line 261) | void reserve(size_type n) {
  function clear (line 268) | void clear(void) {
  function swap (line 274) | void swap(JsonString &rhs) {
  function size_type (line 291) | size_type hash(void) const {
  function compare (line 296) | int compare(const JsonString &rhs) const {
  function compare (line 301) | int compare(const char *cstr) const {
  function JsonString (line 317) | JsonString encode(void) const {
  function JsonString (line 324) | JsonString decode(void) const {
  function size_type (line 331) | size_type capacity(void) const {
  function size_type (line 336) | size_type size(void) const {
  function size_type (line 341) | size_type length(void) const {
  function ssize_type (line 346) | ssize_type refer(void) const {
  function float_type (line 356) | float_type as_float(void) const {
  function integer_type (line 361) | integer_type as_integer(void) const {
  function copy_and_leak (line 388) | bool copy_and_leak(void) {
  function class (line 405) | class JsonValue {
  function val_ (line 522) | JsonValue(const JsonValue &rhs) : val_(0) {
  function JsonValue (line 690) | JsonValue operator[](const char *key) const {
  function JsonValue (line 700) | JsonValue operator[](const JsonString &key) const {
  function JsonValue (line 710) | JsonValue operator[](const std::string &key) const {
  function JsonValue (line 720) | JsonValue operator[](size_type n) const {
  function is_valid (line 725) | bool is_valid(void) const {
  function is_object (line 730) | bool is_object(void) const {
  function is_array (line 735) | bool is_array(void) const {
  function is_string (line 740) | bool is_string(void) const {
  function is_null (line 745) | bool is_null(void) const {
  function is_float (line 750) | bool is_float(void) const {
  function is_integer (line 755) | bool is_integer(void) const {
  function is_boolean (line 760) | bool is_boolean(void) const {
  function assign (line 765) | void assign(const JsonValue &rhs) {
  function assign (line 772) | void assign(JsonValue &&rhs) {
  function assign (line 780) | void assign(const bool &val) {
  function assign (line 788) | void assign(const signed char &val) {
  function assign (line 796) | void assign(const char &val) {
  function assign (line 804) | void assign(const short int &val) {
  function assign (line 812) | void assign(const int &val) {
  function assign (line 820) | void assign(const long int &val) {
  function assign (line 828) | void assign(const long long int &val) {
  function assign (line 836) | void assign(const float &val) {
  function assign (line 844) | void assign(const double &val) {
  function assign (line 852) | void assign(const long double &val) {
  function assign (line 860) | void assign(const unsigned char &val) {
  function assign (line 868) | void assign(const unsigned short int &val) {
  function assign (line 876) | void assign(const unsigned int &val) {
  function assign (line 884) | void assign(const unsigned long int &val) {
  function assign (line 892) | void assign(const unsigned long long int &val) {
  function assign (line 900) | void assign(const JsonString &val) {
  function assign (line 908) | void assign(const char *val) {
  function assign (line 917) | void assign(const char *val, size_type len) {
  function assign (line 926) | void assign(const std::string &val) {
  function ssize_type (line 941) | ssize_type refer(void) const {
  function JsonString (line 946) | JsonString as_json_string(void) const {
  function JsonString (line 964) | const JsonString &as_string(void) const {
  function JsonArray (line 988) | const JsonArray &as_array(void) const {
  function JsonObject (line 1007) | const JsonObject &as_object(void) const {
  function float_type (line 1026) | float_type as_float(void) const {
  function integer_type (line 1031) | integer_type as_integer(void) const {
  function as_bool (line 1036) | bool as_bool(void) const {
  function swap (line 1041) | void swap(JsonValue &rhs) {
  function merge (line 1048) | void merge(const JsonValue &rhs) {
  function parse (line 1056) | bool parse(const char *str) {
  function parse (line 1073) | bool parse(const JsonString &str) {
  function parse (line 1078) | bool parse(const std::string &str) {
  function copy_and_leak (line 1097) | bool copy_and_leak(void) {
  function class (line 1147) | class JsonArray {
  function iter_ (line 1222) | iter_(iter) {}
  function class (line 1230) | class iterator {
  function iter_ (line 1301) | iter_(iter) {}
  function class (line 1309) | class const_reverse_iterator {
  function iter_ (line 1372) | iter_(iter) {}
  function class (line 1380) | class reverse_iterator {
  function iter_ (line 1451) | iter_(iter) {}
  function JsonArray (line 1458) | JsonArray(void) : arr_(0) {}
  function arr_ (line 1461) | JsonArray(const JsonArray &rhs) : arr_(0) {
  function JsonValue (line 1509) | JsonValue operator[](size_type n) const {
  function is_valid (line 1514) | bool is_valid(void) const {
  function empty (line 1519) | bool empty(void) const {
  function size_type (line 1524) | size_type size(void) const {
  function size_type (line 1529) | size_type capacity(void) const {
  function ssize_type (line 1534) | ssize_type refer(void) const {
  function assign (line 1539) | void assign(const JsonArray &rhs) {
  function assign (line 1546) | void assign(JsonArray &&rhs) {
  function reserve (line 1554) | void reserve(size_type n) {
  function reverse (line 1561) | void reverse(void) {
  function push (line 1568) | void push(const JsonValue &val) {
  function pop (line 1578) | void pop(void) {
  function shift (line 1588) | void shift(void) {
  function JsonValue (line 1609) | const JsonValue &at(size_type n) const {
  function JsonValue (line 1628) | const JsonValue &front(void) const {
  function JsonValue (line 1647) | const JsonValue &back(void) const {
  function clear (line 1655) | void clear(void) {
  function swap (line 1661) | void swap(JsonArray &rhs) {
  function merge (line 1668) | void merge(const JsonArray &rhs) {
  function iterator (line 1684) | iterator begin(void) {
  function const_iterator (line 1692) | const_iterator begin(void) const {
  function const_iterator (line 1700) | const_iterator cbegin(void) const {
  function reverse_iterator (line 1708) | reverse_iterator rbegin(void) {
  function const_reverse_iterator (line 1716) | const_reverse_iterator rbegin(void) const {
  function const_reverse_iterator (line 1724) | const_reverse_iterator crbegin(void) const {
  function iterator (line 1732) | iterator end(void) {
  function const_iterator (line 1740) | const_iterator end(void) const {
  function const_iterator (line 1748) | const_iterator cend(void) const {
  function reverse_iterator (line 1756) | reverse_iterator rend(void) {
  function const_reverse_iterator (line 1764) | const_reverse_iterator rend(void) const {
  function const_reverse_iterator (line 1772) | const_reverse_iterator crend(void) const {
  function copy_and_leak (line 1794) | bool copy_and_leak(void) {
  function JsonValue (line 1808) | const JsonValue &get_value(size_type n) const {
  function class (line 1818) | class JsonPair {
  function class (line 1858) | class JsonObject {
  function iter_ (line 1933) | const_iterator(const mod_json_pair_t *iter) : iter_(iter) {}
  function class (line 1941) | class iterator {
  function iter_ (line 2012) | iter_(iter) {}
  function class (line 2020) | class const_reverse_iterator {
  function iter_ (line 2083) | const_reverse_iterator(const mod_json_pair_t *iter) : iter_(iter) {}
  function class (line 2091) | class reverse_iterator {
  function iter_ (line 2162) | iter_(iter) {}
  function JsonObject (line 2169) | JsonObject(void) : obj_(0) {}
  function obj_ (line 2172) | JsonObject(const JsonObject &rhs) : obj_(0) {
  function JsonValue (line 2232) | JsonValue operator[](const char *key) const {
  function JsonValue (line 2247) | JsonValue operator[](const JsonString &key) const {
  function is_valid (line 2252) | bool is_valid(void) const {
  function empty (line 2257) | bool empty(void) const {
  function size_type (line 2262) | size_type size(void) const {
  function ssize_type (line 2267) | ssize_type refer(void) const {
  function assign (line 2272) | void assign(const JsonObject &rhs) {
  function assign (line 2279) | void assign(JsonObject &&rhs) {
  function clear (line 2287) | void clear(void) {
  function set (line 2293) | bool set(const JsonString &key, const JsonValue &val) {
  function get (line 2304) | bool get(const char *key, JsonValue *val) const {
  function get (line 2314) | bool get(const char *key, JsonString *val) const {
  function get (line 2324) | bool get(const char *key, std::string *val) const {
  function get (line 2334) | bool get(const char *key, JsonArray *val) const {
  function get (line 2344) | bool get(const char *key, JsonObject *val) const {
  function get (line 2354) | bool get(const char *key, bool *val) const {
  function get (line 2364) | bool get(const char *key, signed char *val) const {
  function get (line 2374) | bool get(const char *key, char *val) const {
  function get (line 2384) | bool get(const char *key, short int *val) const {
  function get (line 2394) | bool get(const char *key, int *val) const {
  function get (line 2404) | bool get(const char *key, long int *val) const {
  function get (line 2414) | bool get(const char *key, long long int *val) const {
  function get (line 2424) | bool get(const char *key, unsigned char *val) const {
  function get (line 2434) | bool get(const char *key, unsigned short int *val) const {
  function get (line 2444) | bool get(const char *key, unsigned int *val) const {
  function get (line 2454) | bool get(const char *key, unsigned long int *val) const {
  function get (line 2464) | bool get(const char *key, unsigned long long int *val) const {
  function get (line 2474) | bool get(const char *key, float *val) const {
  function get (line 2484) | bool get(const char *key, double *val) const {
  function get (line 2494) | bool get(const char *key, long double *val) const {
  function unset (line 2516) | void unset(const char *key) {
  function has (line 2526) | bool has(const char *key) const {
  function swap (line 2531) | void swap(JsonObject &rhs) {
  function merge (line 2538) | void merge(const JsonObject &rhs) {
  function iterator (line 2546) | iterator begin(void) {
  function const_iterator (line 2554) | const_iterator begin(void) const {
  function const_iterator (line 2562) | const_iterator cbegin(void) const {
  function reverse_iterator (line 2570) | reverse_iterator rbegin(void) {
  function const_reverse_iterator (line 2578) | const_reverse_iterator rbegin(void) const {
  function const_reverse_iterator (line 2586) | const_reverse_iterator crbegin(void) const {
  function iterator (line 2594) | iterator end(void) {
  function const_iterator (line 2602) | const_iterator end(void) const {
  function const_iterator (line 2610) | const_iterator cend(void) const {
  function reverse_iterator (line 2618) | reverse_iterator rend(void) {
  function const_reverse_iterator (line 2626) | const_reverse_iterator rend(void) const {
  function const_reverse_iterator (line 2634) | const_reverse_iterator crend(void) const {
  function copy_and_leak (line 2656) | bool copy_and_leak(void) {
  function assign (line 2669) | inline void JsonValue::assign(const JsonArray &arr) {
  function assign (line 2674) | inline void JsonValue::assign(const JsonObject &obj) {
  function JsonObject (line 2679) | inline JsonObject &JsonValue::to_object(void) {
  function JsonObject (line 2684) | inline const JsonObject &JsonValue::to_object(void) const {
  function JsonArray (line 2689) | inline JsonArray &JsonValue::to_array(void) {
  function JsonArray (line 2694) | inline const JsonArray &JsonValue::to_array(void) const {
  function JsonString (line 2699) | inline JsonString &JsonValue::to_string(void) {
  function JsonString (line 2704) | inline const JsonString &JsonValue::to_string(void) const {
  function JsonValue (line 2709) | inline JsonValue &JsonValue::get_value(const char *key) {
  function JsonValue (line 2720) | inline JsonValue JsonValue::get_value(const char *key) const {
  function JsonValue (line 2725) | inline JsonValue &JsonValue::get_value(size_type n) {
  function JsonValue (line 2736) | inline JsonValue JsonValue::get_value(size_type n) const {
  function set_value (line 2741) | inline void JsonValue::set_value(const JsonArray &val) {
  function set_value (line 2749) | inline void JsonValue::set_value(const JsonObject &val) {
  function class (line 2758) | class JsonParser {
  function set_object_depth (line 2774) | void set_object_depth(size_type depth) {
  function set_array_depth (line 2779) | void set_array_depth(size_type depth) {
  function parse (line 2820) | bool parse(const char *str, JsonValue *out) {
  function error (line 2850) | int error(void) const {
  function state (line 2855) | int state(void) const {
  function class (line 2873) | class JsonDumper {

FILE: deps/proxima/include/ailego/encoding/uri.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/hash/crc32c.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/hash/fnv1.h
  function namespace (line 26) | namespace ailego {
  function Hash64 (line 148) | struct Fnv1a {
  function Hash32 (line 162) | static inline uint32_t Hash32(const void *data, size_t len, uint32_t sum) {
  function Hash32 (line 176) | static inline uint32_t Hash32(const void *data, size_t len) {
  function Hash64 (line 181) | static inline uint64_t Hash64(const void *data, size_t len, uint64_t sum) {
  function Hash64 (line 196) | static inline uint64_t Hash64(const void *data, size_t len) {

FILE: deps/proxima/include/ailego/hash/jump_hash.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/internal/platform.h
  function ailego_ctz32 (line 121) | static inline int ailego_ctz32(uint32_t x) {
  function ailego_clz32 (line 128) | static inline int ailego_clz32(uint32_t x) {
  function ailego_ctz64 (line 136) | static inline int ailego_ctz64(uint64_t x) {
  function ailego_clz64 (line 143) | static inline int ailego_clz64(uint64_t x) {
  function ailego_ctz64 (line 150) | static inline int ailego_ctz64(uint64_t x) {
  function ailego_clz64 (line 165) | static inline int ailego_clz64(uint64_t x) {
  function ailego_assert_report (line 475) | static inline void ailego_assert_report(const char *file, const char *func,

FILE: deps/proxima/include/ailego/io/file.h
  function class (line 30) | class File {

FILE: deps/proxima/include/ailego/io/file_lock.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/io/file_writer.h
  function namespace (line 28) | namespace ailego {
  function is_valid (line 75) | bool is_valid(void) const {
  function create (line 80) | bool create(const char *path) {
  function open (line 85) | bool open(const char *path) {
  function close (line 90) | void close(void) {
  function write (line 95) | size_t write(const void *data, size_t len) {
  function flush (line 100) | bool flush(void) {
  function print (line 105) | void print(const char *format, va_list args) {
  function print (line 113) | void print(const char *format, ...) __attribute__((format(printf, 2, 3))) {

FILE: deps/proxima/include/ailego/io/mmap_file.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/io/pid_file.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/parallel/lock.h
  function lock (line 44) | void lock(void) {
  function try_lock (line 57) | bool try_lock(void) {
  function unlock (line 64) | void unlock(void) {
  function class (line 82) | class SpinMutex {
  function class (line 117) | class SharedMutex {

FILE: deps/proxima/include/ailego/parallel/semaphore.h
  function namespace (line 30) | namespace ailego {

FILE: deps/proxima/include/ailego/parallel/thread_pool.h
  function namespace (line 33) | namespace ailego {
  function wait_finish (line 90) | void wait_finish(void) {
  function is_finished (line 96) | bool is_finished(void) const {
  function pending_count (line 101) | size_t pending_count(void) const {
  function active_count (line 106) | size_t active_count(void) const {
  function mark_task_enqueued (line 114) | void mark_task_enqueued(void) {
  function mark_task_actived (line 119) | void mark_task_actived(void) {
  function notify (line 126) | void notify(void) {
  function explicit (line 146) | explicit ThreadPool(bool binding)
  function ThreadPool (line 151) | ThreadPool(void) : ThreadPool{false}
  function count (line 166) | size_t count(void) const {
  function stop (line 171) | void stop(void) {
  function enqueue (line 179) | void enqueue(const ClosureHandler &handle) {
  function enqueue (line 184) | void enqueue(ClosureHandler &&handle) {
  function enqueue_and_wake (line 189) | void enqueue_and_wake(const ClosureHandler &handle) {
  function enqueue_and_wake (line 194) | void enqueue_and_wake(ClosureHandler &&handle) {
  function wake_any (line 213) | void wake_any(void) {
  function wake_all (line 219) | void wake_all(void) {
  function wait_finish (line 225) | void wait_finish(void) {
  function wait_stop (line 231) | void wait_stop(void) {
  function is_finished (line 242) | bool is_finished(void) const {
  function is_stopped (line 247) | bool is_stopped(void) const {
  function worker_count (line 252) | size_t worker_count(void) const {
  function pending_count (line 257) | size_t pending_count(void) const {
  function active_count (line 262) | size_t active_count(void) const {
  function indexof (line 267) | int indexof(const std::thread::id &thread_id) const {
  function indexof_this (line 277) | int indexof_this(void) const {
  function wait (line 299) | void wait(void) {
  type Task (line 311) | struct Task {
  function TaskControl (line 333) | TaskControl *control{nullptr};

FILE: deps/proxima/include/ailego/parallel/thread_queue.h
  function namespace (line 34) | namespace ailego {

FILE: deps/proxima/include/ailego/pattern/closure.h
  function namespace (line 33) | namespace ailego {
  function CallbackTraits (line 164) | const volatile>
  function run (line 349) | void run(void) override {
  function run (line 354) | void run(R *r) override {
  function run (line 394) | void run(void) override {
  function tuple_ (line 426) | impl_(std::move(impl)), tuple_(std::forward<TArgs>(args)...) {}
  function run (line 429) | void run(void) override {
  function run (line 434) | void run(R *r) override {
  function tuple_ (line 465) | impl_(std::move(impl)), tuple_(std::forward<TArgs>(args)...) {}
  function run (line 468) | void run(void) override {

FILE: deps/proxima/include/ailego/pattern/factory.h
  function namespace (line 32) | namespace ailego {
  function TBase (line 90) | static TBase *Make(const char *key) {
  function std (line 95) | static std::shared_ptr<TBase> MakeShared(const char *key) {
  function std (line 100) | static std::unique_ptr<TBase> MakeUnique(const char *key) {
  function Has (line 105) | static bool Has(const char *key) {
  function std (line 110) | static std::vector<std::string> Classes(void) {
  function Factory (line 119) | static Factory *Instance(void) {
  function TBase (line 131) | TBase *produce(const char *key) {
  function has (line 140) | bool has(const char *key) {
  type KeyComparer (line 161) | struct KeyComparer {

FILE: deps/proxima/include/ailego/pattern/scope_guard.h
  function namespace (line 29) | namespace ailego {
  type ScopeGuard (line 131) | struct ScopeGuard {

FILE: deps/proxima/include/ailego/pattern/singleton.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/string/string_concat_helper.h
  function namespace (line 30) | namespace ailego {

FILE: deps/proxima/include/ailego/string/string_view.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/bitset_helper.h
  function namespace (line 27) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/dl_helper.h
  function namespace (line 27) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/file_helper.h
  function namespace (line 28) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/float_helper.h
  function namespace (line 26) | namespace ailego {
  function class (line 63) | class Float16 {
  function operator (line 105) | operator float() const {
  function operator (line 115) | bool operator!=(const Float16 &rhs) const {
  function operator (line 120) | bool operator<(const Float16 &rhs) const {
  function operator (line 125) | bool operator<=(const Float16 &rhs) const {
  function operator (line 130) | bool operator>(const Float16 &rhs) const {
  function operator (line 135) | bool operator>=(const Float16 &rhs) const {
  function Float16 (line 140) | static inline Float16 Absolute(const Float16 &x) {
  function class (line 152) | class Float16 {
  function operator (line 196) | bool operator==(const Float16 &rhs) const {
  function operator (line 201) | bool operator!=(const Float16 &rhs) const {
  function operator (line 206) | bool operator<(const Float16 &rhs) const {
  function operator (line 211) | bool operator<=(const Float16 &rhs) const {
  function operator (line 216) | bool operator>(const Float16 &rhs) const {
  function operator (line 221) | bool operator>=(const Float16 &rhs) const {
  function Float16 (line 226) | static inline Float16 Absolute(const Float16 &x) {

FILE: deps/proxima/include/ailego/utility/process_helper.h
  function namespace (line 26) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/string_helper.h
  function namespace (line 31) | namespace ailego {

FILE: deps/proxima/include/ailego/utility/string_helper_impl.h
  function namespace (line 29) | namespace details {

FILE: deps/proxima/include/ailego/utility/time_helper.h
  function namespace (line 27) | namespace ailego {
  function Gmtime (line 80) | static size_t Gmtime(char *buf, size_t len) {
  function std (line 85) | static std::string Localtime(void) {
  function std (line 92) | static std::string Gmtime(void) {
  function Localtime (line 99) | static size_t Localtime(uint64_t stamp, char *buf, size_t len) {
  function Gmtime (line 104) | static size_t Gmtime(uint64_t stamp, char *buf, size_t len) {
  function std (line 109) | static std::string Localtime(uint64_t stamp) {
  function std (line 116) | static std::string Gmtime(uint64_t stamp) {
  function class (line 125) | class ElapsedTime {

FILE: deps/proxima/include/ailego/utility/type_helper.h
  function namespace (line 28) | namespace ailego {

FILE: deps/proxima/include/ailego/version.h
  function namespace (line 24) | namespace ailego {

FILE: deps/proxima/include/aitheta2/index_closet.h
  function namespace (line 29) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_container.h
  function class (line 31) | class IndexContainer : public IndexModule {
  function class (line 128) | class Segment : public IndexContainer::Segment {
  function data_crc (line 161) | uint32_t data_crc(void) const override {
  function padding_size (line 166) | size_t padding_size(void) const override {
  function fetch (line 171) | size_t fetch(size_t offset, void *buf, size_t len) const override {
  function read (line 176) | size_t read(size_t offset, const void **data, size_t len) override {
  function read (line 181) | bool read(SegmentData *iovec, size_t count) override {
  function data_size_ (line 199) | size_t data_size_{0u};

FILE: deps/proxima/include/aitheta2/index_context.h
  function namespace (line 30) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_converter.h
  function class (line 40) | class Stats : public IndexStats {
  function set_transformed_count (line 48) | void set_transformed_count(size_t count) {
  function set_dumped_size (line 53) | void set_dumped_size(size_t size) {
  function set_discarded_count (line 58) | void set_discarded_count(size_t count) {
  function set_trained_costtime (line 63) | void set_trained_costtime(uint64_t cost) {
  function set_transformed_costtime (line 68) | void set_transformed_costtime(uint64_t cost) {
  function set_dumped_costtime (line 73) | void set_dumped_costtime(uint64_t cost) {
  function trained_count (line 78) | size_t trained_count(void) const {
  function transformed_count (line 83) | size_t transformed_count(void) const {
  function dumped_size (line 88) | size_t dumped_size(void) const {
  function discarded_count (line 93) | size_t discarded_count(void) const {
  function trained_costtime (line 98) | uint64_t trained_costtime(void) const {
  function transformed_costtime (line 103) | uint64_t transformed_costtime(void) const {
  function dumped_costtime (line 108) | uint64_t dumped_costtime(void) const {
  function trained_costtime_ (line 153) | uint64_t trained_costtime_{0u};

FILE: deps/proxima/include/aitheta2/index_document.h
  function key (line 66) | uint64_t key(void) const {
  function score (line 71) | float score(void) const {
  function index (line 76) | uint32_t index(void) const {
  function set_key (line 96) | void set_key(uint64_t val) {
  function set_score (line 101) | void set_score(float val) {
  function set_index (line 106) | void set_index(uint32_t val) {
  function index_ (line 114) | uint32_t index_{0u};
  function class (line 119) | class IndexDocumentHeap : public ailego::Heap<IndexDocument> {

FILE: deps/proxima/include/aitheta2/index_dumper.h
  function namespace (line 28) | namespace aitheta2 {
  function magic (line 130) | uint32_t magic(void) const override {
  function close_index (line 143) | int close_index(void) {
  function IndexPacker (line 165) | IndexPacker packer_{}

FILE: deps/proxima/include/aitheta2/index_error.h
  function namespace (line 26) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_factory.h
  function namespace (line 36) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_filter.h
  function namespace (line 26) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_format.h
  type MetaHeader (line 41) | struct MetaHeader {
  type MetaFooter (line 61) | struct MetaFooter {
  type SegmentMeta (line 81) | struct SegmentMeta {
  function append (line 103) | bool append(const std::string &id, size_t data_size, size_t padding_size,
  function resize (line 121) | void resize(size_t val) {
  function size (line 131) | size_t size(void) const {
  function crc (line 136) | uint32_t crc(void) const {
  function offset_ (line 146) | size_t offset_{0u};

FILE: deps/proxima/include/aitheta2/index_helper.h
  function namespace (line 30) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_holder.h
  function namespace (line 33) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_logger.h
  function namespace (line 65) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_measure.h
  function namespace (line 27) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_meta.h
  function namespace (line 26) | namespace aitheta2 {
  function UnitSizeof (line 503) | static uint32_t UnitSizeof(FeatureTypes ft) {
  function AlignSizeof (line 519) | static uint32_t AlignSizeof(FeatureTypes ft) {
  function ElementSizeof (line 535) | static uint32_t ElementSizeof(FeatureTypes ft, uint32_t unit, uint32_t d...
  function ElementSizeof (line 555) | static uint32_t ElementSizeof(FeatureTypes ft, uint32_t dim) {
  function FeatureTypes (line 561) | FeatureTypes type_{FeatureTypes::FT_UNDEFINED};
  function class (line 595) | class IndexQueryMeta {
  function dimension (line 617) | uint32_t dimension(void) const {
  function unit_size (line 622) | uint32_t unit_size(void) const {
  function element_size (line 627) | uint32_t element_size(void) const {
  function set_dimension (line 632) | void set_dimension(uint32_t dim) {
  function set_meta (line 638) | void set_meta(IndexMeta::FeatureTypes tp, uint32_t unit, uint32_t dim) {
  function set_meta (line 646) | void set_meta(IndexMeta::FeatureTypes tp, uint32_t dim) {
  function dimension_ (line 652) | uint32_t dimension_{0}
  function unit_size_ (line 653) | uint32_t unit_size_{0}
  function element_size_ (line 654) | uint32_t element_size_{0}

FILE: deps/proxima/include/aitheta2/index_module.h
  function namespace (line 27) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_packer.h
  function namespace (line 29) | namespace aitheta2 {
  function data_crc_ (line 223) | uint32_t data_crc_{0u};

FILE: deps/proxima/include/aitheta2/index_params.h
  function namespace (line 26) | namespace aitheta2 {
  function get (line 151) | bool get(const std::string &key, bool *out) const {
  function get (line 175) | bool get(const std::string &key, char *out) const {
  function get (line 199) | bool get(const std::string &key, unsigned char *out) const {
  function get (line 223) | bool get(const std::string &key, signed char *out) const {
  function get (line 247) | bool get(const std::string &key, short int *out) const {
  function get (line 271) | bool get(const std::string &key, unsigned short int *out) const {
  function get (line 295) | bool get(const std::string &key, int *out) const {
  function get (line 319) | bool get(const std::string &key, unsigned int *out) const {
  function get (line 343) | bool get(const std::string &key, long int *out) const {
  function get (line 367) | bool get(const std::string &key, unsigned long int *out) const {
  function get (line 391) | bool get(const std::string &key, long long int *out) const {
  function get (line 415) | bool get(const std::string &key, unsigned long long int *out) const {
  function get (line 439) | bool get(const std::string &key, float *out) const {
  function get (line 463) | bool get(const std::string &key, double *out) const {
  function get (line 487) | bool get(const std::string &key, long double *out) const {
  function get (line 511) | bool get(const std::string &key, std::string *out) const {
  function get_as_bool (line 545) | bool get_as_bool(const std::string &key) const {
  function get_as_int8 (line 552) | int8_t get_as_int8(const std::string &key) const {
  function get_as_int16 (line 559) | int16_t get_as_int16(const std::string &key) const {
  function get_as_int32 (line 566) | int32_t get_as_int32(const std::string &key) const {
  function get_as_int64 (line 573) | int64_t get_as_int64(const std::string &key) const {
  function get_as_uint8 (line 580) | uint8_t get_as_uint8(const std::string &key) const {
  function get_as_uint16 (line 587) | uint16_t get_as_uint16(const std::string &key) const {
  function get_as_uint32 (line 594) | uint32_t get_as_uint32(const std::string &key) const {
  function get_as_uint64 (line 601) | uint64_t get_as_uint64(const std::string &key) const {
  function get_as_float (line 608) | float get_as_float(const std::string &key) const {
  function get_as_double (line 615) | double get_as_double(const std::string &key) const {
  function ailego (line 636) | const ailego::Hypercube &hypercube(void) const {

FILE: deps/proxima/include/aitheta2/index_plugin.h
  function namespace (line 27) | namespace aitheta2 {
  function class (line 79) | class IndexPluginBroker {

FILE: deps/proxima/include/aitheta2/index_provider.h
  function namespace (line 26) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_reformer.h
  function namespace (line 27) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_searcher.h
  function namespace (line 30) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_stats.h
  function namespace (line 26) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_storage.h
  function namespace (line 27) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_streamer.h
  function namespace (line 30) | namespace aitheta2 {
  function remove (line 541) | int remove(uint64_t key, Context::Pointer &context) {
  function optimize (line 546) | int optimize(aitheta2::IndexThreads::Pointer threads) {

FILE: deps/proxima/include/aitheta2/index_threads.h
  function namespace (line 34) | namespace aitheta2 {

FILE: deps/proxima/include/aitheta2/index_unpacker.h
  function namespace (line 30) | namespace aitheta2 {
  function magic (line 85) | uint32_t magic(void) const {
  function IndexFormat (line 90) | const IndexFormat::MetaHeader &header(void) const {
  function IndexFormat (line 95) | const IndexFormat::MetaFooter &footer(void) const {
  function std (line 100) | const std::string &version(void) const {

FILE: deps/proxima/include/aitheta2/index_version.h
  function namespace (line 24) | namespace aitheta2 {

FILE: sdk/cpp/examples/client_example.cc
  function main (line 27) | int main() {

FILE: sdk/cpp/include/proxima_search_client.h
  type Status (line 31) | struct Status
  type ChannelOptions (line 32) | struct ChannelOptions
  type CollectionConfig (line 33) | struct CollectionConfig
  type CollectionInfo (line 34) | struct CollectionInfo
  type CollectionStats (line 35) | struct CollectionStats
  function class (line 65) | class ProximaSearchClient {
  type class (line 153) | enum class
  type class (line 158) | enum class
  type class (line 183) | enum class
  type Status (line 188) | struct Status {
  type ChannelOptions (line 201) | struct ChannelOptions {
  function timeout_ms (line 209) | uint32_t timeout_ms{1000U};
  type IndexColumnParam (line 233) | struct IndexColumnParam {
  function DataType (line 244) | DataType data_type{DataType::VECTOR_FP32};
  type CollectionConfig (line 295) | struct CollectionConfig {
  function max_docs_per_segment (line 303) | uint32_t max_docs_per_segment{0U};
  type CollectionInfo (line 322) | struct CollectionInfo {
  function max_docs_per_segment (line 348) | uint32_t max_docs_per_segment{0U};
  type CollectionStats (line 364) | struct CollectionStats {
  function total_index_file_size (line 433) | uint64_t total_index_file_size{0U};
  function class (line 454) | class WriteRequest {
  function class (line 579) | class QueryRequest {
  function virtual (line 661) | virtual uint64_t primary_key() const = 0;

FILE: sdk/cpp/src/grpc_client.cc
  type proxima (line 26) | namespace proxima {
    type be (line 27) | namespace be {
      function Status (line 29) | Status GrpcProximaSearchClient::connect(const ChannelOptions &option...
      function Status (line 72) | Status GrpcProximaSearchClient::close() {
      function Status (line 96) | Status GrpcProximaSearchClient::create_collection(
      function Status (line 120) | Status GrpcProximaSearchClient::drop_collection(
      function Status (line 146) | Status GrpcProximaSearchClient::describe_collection(
      function Status (line 177) | Status GrpcProximaSearchClient::stats_collection(
      function Status (line 207) | Status GrpcProximaSearchClient::list_collections(
      function Status (line 234) | Status GrpcProximaSearchClient::write(const WriteRequest &write_requ...
      function Status (line 256) | Status GrpcProximaSearchClient::query(const QueryRequest &query_requ...
      function Status (line 280) | Status GrpcProximaSearchClient::get_document_by_key(
      function Status (line 468) | Status GrpcProximaSearchClient::validate(const CollectionConfig &con...
      function Status (line 504) | Status GrpcProximaSearchClient::validate(const PbWriteRequest &reque...
      function Status (line 548) | Status GrpcProximaSearchClient::validate(const PbQueryRequest &reque...
      function Status (line 604) | Status GrpcProximaSearchClient::validate(const PbGetDocumentRequest ...

FILE: sdk/cpp/src/grpc_client.h
  function namespace (line 50) | namespace proxima {

FILE: sdk/cpp/src/http_client.cc
  type proxima (line 27) | namespace proxima {
    type be (line 28) | namespace be {
      function Status (line 30) | Status HttpProximaSearchClient::connect(const ChannelOptions &option...
      function Status (line 56) | Status HttpProximaSearchClient::close() {
      function Status (line 218) | Status HttpProximaSearchClient::check_server_version() {

FILE: sdk/cpp/src/http_client.h
  function namespace (line 25) | namespace proxima {

FILE: sdk/cpp/src/proxima_search_client.cc
  type proxima (line 4) | namespace proxima {
    type be (line 5) | namespace be {
      function ProximaSearchClientPtr (line 7) | ProximaSearchClientPtr ProximaSearchClient::Create(const std::string...
      function ProximaSearchClientPtr (line 17) | ProximaSearchClientPtr ProximaSearchClient::ProximaSearchClient::Cre...
      function WriteRequestPtr (line 21) | WriteRequestPtr WriteRequest::Create() {
      function QueryRequestPtr (line 25) | QueryRequestPtr QueryRequest::Create() {
      function QueryResponsePtr (line 29) | QueryResponsePtr QueryResponse::Create() {
      function GetDocumentRequestPtr (line 33) | GetDocumentRequestPtr GetDocumentRequest::Create() {
      function GetDocumentResponsePtr (line 37) | GetDocumentResponsePtr GetDocumentResponse::Create() {

FILE: sdk/cpp/src/version.h
  function namespace (line 29) | namespace proxima {

FILE: sdk/go/client_proxy.go
  function wrapError (line 29) | func wrapError(in *pb.Status) error {
  type proximaSEClientProxy (line 40) | type proximaSEClientProxy struct
    method CreateCollection (line 44) | func (proxy *proximaSEClientProxy) CreateCollection(config *Collection...
    method DropCollection (line 56) | func (proxy *proximaSEClientProxy) DropCollection(collection string) e...
    method DescribeCollection (line 66) | func (proxy *proximaSEClientProxy) DescribeCollection(collection strin...
    method ListCollections (line 82) | func (proxy *proximaSEClientProxy) ListCollections(filters ...ListColl...
    method StatCollection (line 106) | func (proxy *proximaSEClientProxy) StatCollection(collection string) (...
    method Write (line 121) | func (proxy *proximaSEClientProxy) Write(req *WriteRequest) error {
    method Query (line 151) | func (proxy *proximaSEClientProxy) Query(collection string, column str...
    method GetDocumentByKey (line 166) | func (proxy *proximaSEClientProxy) GetDocumentByKey(collection string,...
  function DefaultAddress (line 186) | func DefaultAddress() *Address {
  function NewProximaSearchClient (line 194) | func NewProximaSearchClient(conn ConnectionProtocol, address *Address) (...

FILE: sdk/go/clients.go
  type proximaSEPBClient (line 41) | type proximaSEPBClient interface
  function buildContext (line 62) | func buildContext() (context.Context, context.CancelFunc) {
  type grpcClient (line 67) | type grpcClient struct
    method GetVersion (line 72) | func (c *grpcClient) GetVersion() (string, error) {
    method CreateCollection (line 81) | func (c *grpcClient) CreateCollection(in *pb.CollectionConfig) (*pb.St...
    method DropCollection (line 86) | func (c *grpcClient) DropCollection(in *pb.CollectionName) (*pb.Status...
    method DescribeCollection (line 91) | func (c *grpcClient) DescribeCollection(in *pb.CollectionName) (*pb.De...
    method ListCollections (line 96) | func (c *grpcClient) ListCollections(in *pb.ListCondition) (*pb.ListCo...
    method StatsCollection (line 101) | func (c *grpcClient) StatsCollection(in *pb.CollectionName) (*pb.Stats...
    method Write (line 106) | func (c *grpcClient) Write(in *pb.WriteRequest) (*pb.Status, error) {
    method Query (line 111) | func (c *grpcClient) Query(in *pb.QueryRequest) (*pb.QueryResponse, er...
    method GetDocumentByKey (line 116) | func (c *grpcClient) GetDocumentByKey(in *pb.GetDocumentRequest) (*pb....
  type httpClient (line 131) | type httpClient struct
    method makeURI (line 135) | func (c *httpClient) makeURI(format string, args ...interface{}) string {
    method getMessageFromIO (line 140) | func (c *httpClient) getMessageFromIO(r io.Reader, m proto.Message) er...
    method getStatusFromIO (line 148) | func (c *httpClient) getStatusFromIO(r io.Reader) (*pb.Status, error) {
    method GetVersion (line 174) | func (c *httpClient) GetVersion() (string, error) {
    method CreateCollection (line 188) | func (c *httpClient) CreateCollection(in *pb.CollectionConfig) (*pb.St...
    method DropCollection (line 201) | func (c *httpClient) DropCollection(in *pb.CollectionName) (*pb.Status...
    method DescribeCollection (line 210) | func (c *httpClient) DescribeCollection(in *pb.CollectionName) (*pb.De...
    method ListCollections (line 225) | func (c *httpClient) ListCollections(in *pb.ListCondition) (*pb.ListCo...
    method StatsCollection (line 244) | func (c *httpClient) StatsCollection(in *pb.CollectionName) (*pb.Stats...
    method Write (line 259) | func (c *httpClient) Write(in *pb.WriteRequest) (*pb.Status, error) {
    method Query (line 272) | func (c *httpClient) Query(in *pb.QueryRequest) (*pb.QueryResponse, er...
    method GetDocumentByKey (line 291) | func (c *httpClient) GetDocumentByKey(in *pb.GetDocumentRequest) (*pb....
  function httpGetWithBody (line 157) | func httpGetWithBody(url string, contentType string, body io.Reader) (re...
  function httpDel (line 166) | func httpDel(url string) (resp *http.Response, err error) {
  function newProximaSEPBClient (line 307) | func newProximaSEPBClient(connType ConnectionProtocol, address Address) ...

FILE: sdk/go/const.go
  type ConnectionProtocol (line 24) | type ConnectionProtocol
  constant GrpcProtocol (line 29) | GrpcProtocol ConnectionProtocol = iota
  constant HttpProtocol (line 31) | HttpProtocol
  type MetricType (line 35) | type MetricType
  constant MetricTypeUndefined (line 40) | MetricTypeUndefined MetricType = iota
  constant SquaredEuclidean (line 42) | SquaredEuclidean
  constant Euclidean (line 44) | Euclidean
  constant Manhattan (line 46) | Manhattan
  constant InnerProduct (line 48) | InnerProduct
  constant Hamming (line 50) | Hamming
  type IndexType (line 54) | type IndexType
  constant IndexTypeUndefined (line 59) | IndexTypeUndefined IndexType = iota
  constant ProximaGraphIndex (line 61) | ProximaGraphIndex
  type DataType (line 65) | type DataType
  constant DataTypeUndefined (line 70) | DataTypeUndefined DataType = iota
  constant Binary (line 72) | Binary DataType = 1
  constant String (line 74) | String DataType = 2
  constant Bool (line 76) | Bool DataType = 3
  constant Int32 (line 78) | Int32 DataType = 4
  constant Int64 (line 80) | Int64 DataType = 5
  constant Uint32 (line 82) | Uint32 DataType = 6
  constant Uint64 (line 84) | Uint64 DataType = 7
  constant Float (line 86) | Float DataType = 8
  constant Double (line 88) | Double DataType = 9
  constant VectorBinary32 (line 92) | VectorBinary32 DataType = 20
  constant VectorBinary64 (line 96) | VectorBinary64 DataType = 21
  constant VectorFP16 (line 99) | VectorFP16 DataType = 22
  constant VectorFP32 (line 101) | VectorFP32 DataType = 23
  constant VectorFP64 (line 103) | VectorFP64 DataType = 24
  constant VectorInt4 (line 105) | VectorInt4 DataType = 25
  constant VectorInt8 (line 107) | VectorInt8 DataType = 26
  constant VectorInt16 (line 109) | VectorInt16 DataType = 27
  type OperationType (line 113) | type OperationType
  constant Insert (line 118) | Insert OperationType = iota
  constant Update (line 120) | Update
  constant Delete (line 122) | Delete
  type ErrorCode (line 126) | type ErrorCode
  constant Success (line 130) | Success ErrorCode = 0
  constant RetryLater (line 132) | RetryLater ErrorCode = -4009
  constant Unknown (line 134) | Unknown ErrorCode = -1000000
  constant Incompatible (line 137) | Incompatible ErrorCode = -1000001
  type RepositoryType (line 141) | type RepositoryType
  constant Database (line 146) | Database RepositoryType = iota
  type CollectionStatus (line 150) | type CollectionStatus
  constant Initialized (line 155) | Initialized CollectionStatus = iota
  constant Serving (line 157) | Serving
  constant Dropped (line 159) | Dropped
  type SegmentState (line 163) | type SegmentState
  constant Created (line 168) | Created SegmentState = iota
  constant Writing (line 170) | Writing
  constant Dumping (line 172) | Dumping
  constant Compacting (line 174) | Compacting
  constant Persist (line 176) | Persist

FILE: sdk/go/examples/demo/example.go
  function initAndParseArgs (line 38) | func initAndParseArgs() {
  function main (line 47) | func main() {

FILE: sdk/go/interfaces.go
  type ProximaSearchClient (line 26) | type ProximaSearchClient interface

FILE: sdk/go/options.go
  type ListCollectionFilter (line 30) | type ListCollectionFilter interface
  type listCollectionFilter (line 34) | type listCollectionFilter struct
    method apply (line 38) | func (opt *listCollectionFilter) apply(opts *pb.ListCondition) {
  function newlistCollectionFilter (line 42) | func newlistCollectionFilter(filter func(*pb.ListCondition)) *listCollec...
  function ByRepo (line 49) | func ByRepo(repo string) ListCollectionFilter {
  type queryOptions (line 56) | type queryOptions struct
  type QueryOption (line 70) | type QueryOption interface
  type funcOption (line 74) | type funcOption struct
    method apply (line 78) | func (opt *funcOption) apply(opts *queryOptions) bool {
  function defaultOptions (line 82) | func defaultOptions() *queryOptions {
  function newQueryOption (line 92) | func newQueryOption(f func(opts *queryOptions) bool) *funcOption {
  function WithTopK (line 99) | func WithTopK(topk uint32) QueryOption {
  function WithRadius (line 110) | func WithRadius(radius float32) QueryOption {
  function WithLinearSearch (line 121) | func WithLinearSearch() QueryOption {
  function WithDebugMode (line 130) | func WithDebugMode() QueryOption {
  function WithParam (line 143) | func WithParam(key string, value interface{}) QueryOption {

FILE: sdk/go/proto/common.pb.go
  constant _ (line 39) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 41) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 46) | _ = proto.ProtoPackageIsVersion4
  type OperationType (line 49) | type OperationType
    method Enum (line 71) | func (x OperationType) Enum() *OperationType {
    method String (line 77) | func (x OperationType) String() string {
    method Descriptor (line 81) | func (OperationType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 85) | func (OperationType) Type() protoreflect.EnumType {
    method Number (line 89) | func (x OperationType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 94) | func (OperationType) EnumDescriptor() ([]byte, []int) {
  constant OperationType_OP_INSERT (line 52) | OperationType_OP_INSERT OperationType = 0
  constant OperationType_OP_UPDATE (line 53) | OperationType_OP_UPDATE OperationType = 1
  constant OperationType_OP_DELETE (line 54) | OperationType_OP_DELETE OperationType = 2
  type FeatureType (line 99) | type FeatureType
    method Enum (line 139) | func (x FeatureType) Enum() *FeatureType {
    method String (line 145) | func (x FeatureType) String() string {
    method Descriptor (line 149) | func (FeatureType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 153) | func (FeatureType) Type() protoreflect.EnumType {
    method Number (line 157) | func (x FeatureType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 162) | func (FeatureType) EnumDescriptor() ([]byte, []int) {
  constant FeatureType_FT_UNDEFINED (line 102) | FeatureType_FT_UNDEFINED FeatureType = 0
  constant FeatureType_FT_BINARY32 (line 103) | FeatureType_FT_BINARY32  FeatureType = 1
  constant FeatureType_FT_BINARY64 (line 104) | FeatureType_FT_BINARY64  FeatureType = 2
  constant FeatureType_FT_FP16 (line 105) | FeatureType_FT_FP16      FeatureType = 3
  constant FeatureType_FT_FP32 (line 106) | FeatureType_FT_FP32      FeatureType = 4
  constant FeatureType_FT_FP64 (line 107) | FeatureType_FT_FP64      FeatureType = 5
  constant FeatureType_FT_INT8 (line 108) | FeatureType_FT_INT8      FeatureType = 6
  constant FeatureType_FT_INT16 (line 109) | FeatureType_FT_INT16     FeatureType = 7
  constant FeatureType_FT_INT4 (line 110) | FeatureType_FT_INT4      FeatureType = 8
  type IndexType (line 167) | type IndexType
    method Enum (line 186) | func (x IndexType) Enum() *IndexType {
    method String (line 192) | func (x IndexType) String() string {
    method Descriptor (line 196) | func (IndexType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 200) | func (IndexType) Type() protoreflect.EnumType {
    method Number (line 204) | func (x IndexType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 209) | func (IndexType) EnumDescriptor() ([]byte, []int) {
  constant IndexType_IT_UNDEFINED (line 170) | IndexType_IT_UNDEFINED           IndexType = 0
  constant IndexType_IT_PROXIMA_GRAPH_INDEX (line 171) | IndexType_IT_PROXIMA_GRAPH_INDEX IndexType = 1
  type DataType (line 213) | type DataType
    method Enum (line 280) | func (x DataType) Enum() *DataType {
    method String (line 286) | func (x DataType) String() string {
    method Descriptor (line 290) | func (DataType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 294) | func (DataType) Type() protoreflect.EnumType {
    method Number (line 298) | func (x DataType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 303) | func (DataType) EnumDescriptor() ([]byte, []int) {
  constant DataType_DT_UNDEFINED (line 216) | DataType_DT_UNDEFINED       DataType = 0
  constant DataType_DT_BINARY (line 217) | DataType_DT_BINARY          DataType = 1
  constant DataType_DT_STRING (line 218) | DataType_DT_STRING          DataType = 2
  constant DataType_DT_BOOL (line 219) | DataType_DT_BOOL            DataType = 3
  constant DataType_DT_INT32 (line 220) | DataType_DT_INT32           DataType = 4
  constant DataType_DT_INT64 (line 221) | DataType_DT_INT64           DataType = 5
  constant DataType_DT_UINT32 (line 222) | DataType_DT_UINT32          DataType = 6
  constant DataType_DT_UINT64 (line 223) | DataType_DT_UINT64          DataType = 7
  constant DataType_DT_FLOAT (line 224) | DataType_DT_FLOAT           DataType = 8
  constant DataType_DT_DOUBLE (line 225) | DataType_DT_DOUBLE          DataType = 9
  constant DataType_DT_VECTOR_BINARY32 (line 226) | DataType_DT_VECTOR_BINARY32 DataType = 20
  constant DataType_DT_VECTOR_BINARY64 (line 227) | DataType_DT_VECTOR_BINARY64 DataType = 21
  constant DataType_DT_VECTOR_FP16 (line 228) | DataType_DT_VECTOR_FP16     DataType = 22
  constant DataType_DT_VECTOR_FP32 (line 229) | DataType_DT_VECTOR_FP32     DataType = 23
  constant DataType_DT_VECTOR_FP64 (line 230) | DataType_DT_VECTOR_FP64     DataType = 24
  constant DataType_DT_VECTOR_INT4 (line 231) | DataType_DT_VECTOR_INT4     DataType = 25
  constant DataType_DT_VECTOR_INT8 (line 232) | DataType_DT_VECTOR_INT8     DataType = 26
  constant DataType_DT_VECTOR_INT16 (line 233) | DataType_DT_VECTOR_INT16    DataType = 27
  type GenericValueMeta_FieldType (line 308) | type GenericValueMeta_FieldType
    method Enum (line 348) | func (x GenericValueMeta_FieldType) Enum() *GenericValueMeta_FieldType {
    method String (line 354) | func (x GenericValueMeta_FieldType) String() string {
    method Descriptor (line 358) | func (GenericValueMeta_FieldType) Descriptor() protoreflect.EnumDescri...
    method Type (line 362) | func (GenericValueMeta_FieldType) Type() protoreflect.EnumType {
    method Number (line 366) | func (x GenericValueMeta_FieldType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 371) | func (GenericValueMeta_FieldType) EnumDescriptor() ([]byte, []int) {
  constant GenericValueMeta_FT_BYTES (line 311) | GenericValueMeta_FT_BYTES  GenericValueMeta_FieldType = 0
  constant GenericValueMeta_FT_STRING (line 312) | GenericValueMeta_FT_STRING GenericValueMeta_FieldType = 1
  constant GenericValueMeta_FT_BOOL (line 313) | GenericValueMeta_FT_BOOL   GenericValueMeta_FieldType = 2
  constant GenericValueMeta_FT_INT32 (line 314) | GenericValueMeta_FT_INT32  GenericValueMeta_FieldType = 3
  constant GenericValueMeta_FT_INT64 (line 315) | GenericValueMeta_FT_INT64  GenericValueMeta_FieldType = 4
  constant GenericValueMeta_FT_UINT32 (line 316) | GenericValueMeta_FT_UINT32 GenericValueMeta_FieldType = 5
  constant GenericValueMeta_FT_UINT64 (line 317) | GenericValueMeta_FT_UINT64 GenericValueMeta_FieldType = 6
  constant GenericValueMeta_FT_FLOAT (line 318) | GenericValueMeta_FT_FLOAT  GenericValueMeta_FieldType = 7
  constant GenericValueMeta_FT_DOUBLE (line 319) | GenericValueMeta_FT_DOUBLE GenericValueMeta_FieldType = 8
  type GenericValue (line 376) | type GenericValue struct
    method Reset (line 394) | func (x *GenericValue) Reset() {
    method String (line 403) | func (x *GenericValue) String() string {
    method ProtoMessage (line 407) | func (*GenericValue) ProtoMessage() {}
    method ProtoReflect (line 409) | func (x *GenericValue) ProtoReflect() protoreflect.Message {
    method Descriptor (line 422) | func (*GenericValue) Descriptor() ([]byte, []int) {
    method GetValueOneof (line 426) | func (m *GenericValue) GetValueOneof() isGenericValue_ValueOneof {
    method GetBytesValue (line 433) | func (x *GenericValue) GetBytesValue() []byte {
    method GetStringValue (line 440) | func (x *GenericValue) GetStringValue() string {
    method GetBoolValue (line 447) | func (x *GenericValue) GetBoolValue() bool {
    method GetInt32Value (line 454) | func (x *GenericValue) GetInt32Value() int32 {
    method GetInt64Value (line 461) | func (x *GenericValue) GetInt64Value() int64 {
    method GetUint32Value (line 468) | func (x *GenericValue) GetUint32Value() uint32 {
    method GetUint64Value (line 475) | func (x *GenericValue) GetUint64Value() uint64 {
    method GetFloatValue (line 482) | func (x *GenericValue) GetFloatValue() float32 {
    method GetDoubleValue (line 489) | func (x *GenericValue) GetDoubleValue() float64 {
  type isGenericValue_ValueOneof (line 496) | type isGenericValue_ValueOneof interface
  type GenericValue_BytesValue (line 500) | type GenericValue_BytesValue struct
    method isGenericValue_ValueOneof (line 536) | func (*GenericValue_BytesValue) isGenericValue_ValueOneof() {}
  type GenericValue_StringValue (line 504) | type GenericValue_StringValue struct
    method isGenericValue_ValueOneof (line 538) | func (*GenericValue_StringValue) isGenericValue_ValueOneof() {}
  type GenericValue_BoolValue (line 508) | type GenericValue_BoolValue struct
    method isGenericValue_ValueOneof (line 540) | func (*GenericValue_BoolValue) isGenericValue_ValueOneof() {}
  type GenericValue_Int32Value (line 512) | type GenericValue_Int32Value struct
    method isGenericValue_ValueOneof (line 542) | func (*GenericValue_Int32Value) isGenericValue_ValueOneof() {}
  type GenericValue_Int64Value (line 516) | type GenericValue_Int64Value struct
    method isGenericValue_ValueOneof (line 544) | func (*GenericValue_Int64Value) isGenericValue_ValueOneof() {}
  type GenericValue_Uint32Value (line 520) | type GenericValue_Uint32Value struct
    method isGenericValue_ValueOneof (line 546) | func (*GenericValue_Uint32Value) isGenericValue_ValueOneof() {}
  type GenericValue_Uint64Value (line 524) | type GenericValue_Uint64Value struct
    method isGenericValue_ValueOneof (line 548) | func (*GenericValue_Uint64Value) isGenericValue_ValueOneof() {}
  type GenericValue_FloatValue (line 528) | type GenericValue_FloatValue struct
    method isGenericValue_ValueOneof (line 550) | func (*GenericValue_FloatValue) isGenericValue_ValueOneof() {}
  type GenericValue_DoubleValue (line 532) | type GenericValue_DoubleValue struct
    method isGenericValue_ValueOneof (line 552) | func (*GenericValue_DoubleValue) isGenericValue_ValueOneof() {}
  type GenericValueList (line 555) | type GenericValueList struct
    method Reset (line 563) | func (x *GenericValueList) Reset() {
    method String (line 572) | func (x *GenericValueList) String() string {
    method ProtoMessage (line 576) | func (*GenericValueList) ProtoMessage() {}
    method ProtoReflect (line 578) | func (x *GenericValueList) ProtoReflect() protoreflect.Message {
    method Descriptor (line 591) | func (*GenericValueList) Descriptor() ([]byte, []int) {
    method GetValues (line 595) | func (x *GenericValueList) GetValues() []*GenericValue {
  type GenericValueMeta (line 603) | type GenericValueMeta struct
    method Reset (line 612) | func (x *GenericValueMeta) Reset() {
    method String (line 621) | func (x *GenericValueMeta) String() string {
    method ProtoMessage (line 625) | func (*GenericValueMeta) ProtoMessage() {}
    method ProtoReflect (line 627) | func (x *GenericValueMeta) ProtoReflect() protoreflect.Message {
    method Descriptor (line 640) | func (*GenericValueMeta) Descriptor() ([]byte, []int) {
    method GetFieldName (line 644) | func (x *GenericValueMeta) GetFieldName() string {
    method GetFieldType (line 651) | func (x *GenericValueMeta) GetFieldType() GenericValueMeta_FieldType {
  type GenericKeyValue (line 659) | type GenericKeyValue struct
    method Reset (line 668) | func (x *GenericKeyValue) Reset() {
    method String (line 677) | func (x *GenericKeyValue) String() string {
    method ProtoMessage (line 681) | func (*GenericKeyValue) ProtoMessage() {}
    method ProtoReflect (line 683) | func (x *GenericKeyValue) ProtoReflect() protoreflect.Message {
    method Descriptor (line 696) | func (*GenericKeyValue) Descriptor() ([]byte, []int) {
    method GetKey (line 700) | func (x *GenericKeyValue) GetKey() string {
    method GetValue (line 707) | func (x *GenericKeyValue) GetValue() *GenericValue {
  type KeyValuePair (line 715) | type KeyValuePair struct
    method Reset (line 724) | func (x *KeyValuePair) Reset() {
    method String (line 733) | func (x *KeyValuePair) String() string {
    method ProtoMessage (line 737) | func (*KeyValuePair) ProtoMessage() {}
    method ProtoReflect (line 739) | func (x *KeyValuePair) ProtoReflect() protoreflect.Message {
    method Descriptor (line 752) | func (*KeyValuePair) Descriptor() ([]byte, []int) {
    method GetKey (line 756) | func (x *KeyValuePair) GetKey() string {
    method GetValue (line 763) | func (x *KeyValuePair) GetValue() string {
  type CommonResponse (line 771) | type CommonResponse struct
    method Reset (line 780) | func (x *CommonResponse) Reset() {
    method String (line 789) | func (x *CommonResponse) String() string {
    method ProtoMessage (line 793) | func (*CommonResponse) ProtoMessage() {}
    method ProtoReflect (line 795) | func (x *CommonResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 808) | func (*CommonResponse) Descriptor() ([]byte, []int) {
    method GetCode (line 812) | func (x *CommonResponse) GetCode() int32 {
    method GetReason (line 819) | func (x *CommonResponse) GetReason() string {
  type Status (line 826) | type Status struct
    method Reset (line 835) | func (x *Status) Reset() {
    method String (line 844) | func (x *Status) String() string {
    method ProtoMessage (line 848) | func (*Status) ProtoMessage() {}
    method ProtoReflect (line 850) | func (x *Status) ProtoReflect() protoreflect.Message {
    method Descriptor (line 863) | func (*Status) Descriptor() ([]byte, []int) {
    method GetCode (line 867) | func (x *Status) GetCode() int32 {
    method GetReason (line 874) | func (x *Status) GetReason() string {
  type HttpRequest (line 882) | type HttpRequest struct
    method Reset (line 888) | func (x *HttpRequest) Reset() {
    method String (line 897) | func (x *HttpRequest) String() string {
    method ProtoMessage (line 901) | func (*HttpRequest) ProtoMessage() {}
    method ProtoReflect (line 903) | func (x *HttpRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 916) | func (*HttpRequest) Descriptor() ([]byte, []int) {
  type HttpResponse (line 921) | type HttpResponse struct
    method Reset (line 927) | func (x *HttpResponse) Reset() {
    method String (line 936) | func (x *HttpResponse) String() string {
    method ProtoMessage (line 940) | func (*HttpResponse) ProtoMessage() {}
    method ProtoReflect (line 942) | func (x *HttpResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 955) | func (*HttpResponse) Descriptor() ([]byte, []int) {
  function file_proto_common_proto_rawDescGZIP (line 1073) | func file_proto_common_proto_rawDescGZIP() []byte {
  function init (line 1109) | func init() { file_proto_common_proto_init() }
  function file_proto_common_proto_init (line 1110) | func file_proto_common_proto_init() {

FILE: sdk/go/proto/config.pb.go
  constant _ (line 39) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 41) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 46) | _ = proto.ProtoPackageIsVersion4
  type MetricsConfig (line 48) | type MetricsConfig struct
    method Reset (line 56) | func (x *MetricsConfig) Reset() {
    method String (line 65) | func (x *MetricsConfig) String() string {
    method ProtoMessage (line 69) | func (*MetricsConfig) ProtoMessage() {}
    method ProtoReflect (line 71) | func (x *MetricsConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 84) | func (*MetricsConfig) Descriptor() ([]byte, []int) {
    method GetName (line 88) | func (x *MetricsConfig) GetName() string {
  type CommonConfig (line 96) | type CommonConfig struct
    method Reset (line 111) | func (x *CommonConfig) Reset() {
    method String (line 120) | func (x *CommonConfig) String() string {
    method ProtoMessage (line 124) | func (*CommonConfig) ProtoMessage() {}
    method ProtoReflect (line 126) | func (x *CommonConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 139) | func (*CommonConfig) Descriptor() ([]byte, []int) {
    method GetProtocol (line 143) | func (x *CommonConfig) GetProtocol() string {
    method GetGrpcListenPort (line 150) | func (x *CommonConfig) GetGrpcListenPort() uint32 {
    method GetHttpListenPort (line 157) | func (x *CommonConfig) GetHttpListenPort() uint32 {
    method GetLoggerType (line 164) | func (x *CommonConfig) GetLoggerType() string {
    method GetLogDirectory (line 171) | func (x *CommonConfig) GetLogDirectory() string {
    method GetLogFile (line 178) | func (x *CommonConfig) GetLogFile() string {
    method GetLogLevel (line 185) | func (x *CommonConfig) GetLogLevel() int32 {
    method GetMetricsConfig (line 192) | func (x *CommonConfig) GetMetricsConfig() *MetricsConfig {
  type QueryConfig (line 200) | type QueryConfig struct
    method Reset (line 208) | func (x *QueryConfig) Reset() {
    method String (line 217) | func (x *QueryConfig) String() string {
    method ProtoMessage (line 221) | func (*QueryConfig) ProtoMessage() {}
    method ProtoReflect (line 223) | func (x *QueryConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 236) | func (*QueryConfig) Descriptor() ([]byte, []int) {
    method GetQueryThreadCount (line 240) | func (x *QueryConfig) GetQueryThreadCount() uint32 {
  type IndexConfig (line 248) | type IndexConfig struct
    method Reset (line 260) | func (x *IndexConfig) Reset() {
    method String (line 269) | func (x *IndexConfig) String() string {
    method ProtoMessage (line 273) | func (*IndexConfig) ProtoMessage() {}
    method ProtoReflect (line 275) | func (x *IndexConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 288) | func (*IndexConfig) Descriptor() ([]byte, []int) {
    method GetBuildThreadCount (line 292) | func (x *IndexConfig) GetBuildThreadCount() uint32 {
    method GetDumpThreadCount (line 299) | func (x *IndexConfig) GetDumpThreadCount() uint32 {
    method GetMaxBuildQps (line 306) | func (x *IndexConfig) GetMaxBuildQps() uint32 {
    method GetIndexDirectory (line 313) | func (x *IndexConfig) GetIndexDirectory() string {
    method GetFlushInternal (line 320) | func (x *IndexConfig) GetFlushInternal() uint32 {
  type MetaConfig (line 328) | type MetaConfig struct
    method Reset (line 336) | func (x *MetaConfig) Reset() {
    method String (line 345) | func (x *MetaConfig) String() string {
    method ProtoMessage (line 349) | func (*MetaConfig) ProtoMessage() {}
    method ProtoReflect (line 351) | func (x *MetaConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 364) | func (*MetaConfig) Descriptor() ([]byte, []int) {
    method GetMetaUri (line 368) | func (x *MetaConfig) GetMetaUri() string {
  type ProximaSEConfig (line 376) | type ProximaSEConfig struct
    method Reset (line 387) | func (x *ProximaSEConfig) Reset() {
    method String (line 396) | func (x *ProximaSEConfig) String() string {
    method ProtoMessage (line 400) | func (*ProximaSEConfig) ProtoMessage() {}
    method ProtoReflect (line 402) | func (x *ProximaSEConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 415) | func (*ProximaSEConfig) Descriptor() ([]byte, []int) {
    method GetCommonConfig (line 419) | func (x *ProximaSEConfig) GetCommonConfig() *CommonConfig {
    method GetQueryConfig (line 426) | func (x *ProximaSEConfig) GetQueryConfig() *QueryConfig {
    method GetIndexConfig (line 433) | func (x *ProximaSEConfig) GetIndexConfig() *IndexConfig {
    method GetMetaConfig (line 440) | func (x *ProximaSEConfig) GetMetaConfig() *MetaConfig {
  function file_proto_config_proto_rawDescGZIP (line 522) | func file_proto_config_proto_rawDescGZIP() []byte {
  function init (line 551) | func init() { file_proto_config_proto_init() }
  function file_proto_config_proto_init (line 552) | func file_proto_config_proto_init() {

FILE: sdk/go/proto/proxima_be.pb.go
  constant _ (line 23) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  constant _ (line 25) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  constant _ (line 30) | _ = proto.ProtoPackageIsVersion4
  type CollectionConfig_RepositoryConfig_RepositoryType (line 32) | type CollectionConfig_RepositoryConfig_RepositoryType
    method Enum (line 48) | func (x CollectionConfig_RepositoryConfig_RepositoryType) Enum() *Coll...
    method String (line 54) | func (x CollectionConfig_RepositoryConfig_RepositoryType) String() str...
    method Descriptor (line 58) | func (CollectionConfig_RepositoryConfig_RepositoryType) Descriptor() p...
    method Type (line 62) | func (CollectionConfig_RepositoryConfig_RepositoryType) Type() protore...
    method Number (line 66) | func (x CollectionConfig_RepositoryConfig_RepositoryType) Number() pro...
    method EnumDescriptor (line 71) | func (CollectionConfig_RepositoryConfig_RepositoryType) EnumDescriptor...
  constant CollectionConfig_RepositoryConfig_RT_DATABASE (line 35) | CollectionConfig_RepositoryConfig_RT_DATABASE CollectionConfig_Repositor...
  type CollectionInfo_CollectionStatus (line 75) | type CollectionInfo_CollectionStatus
    method Enum (line 97) | func (x CollectionInfo_CollectionStatus) Enum() *CollectionInfo_Collec...
    method String (line 103) | func (x CollectionInfo_CollectionStatus) String() string {
    method Descriptor (line 107) | func (CollectionInfo_CollectionStatus) Descriptor() protoreflect.EnumD...
    method Type (line 111) | func (CollectionInfo_CollectionStatus) Type() protoreflect.EnumType {
    method Number (line 115) | func (x CollectionInfo_CollectionStatus) Number() protoreflect.EnumNum...
    method EnumDescriptor (line 120) | func (CollectionInfo_CollectionStatus) EnumDescriptor() ([]byte, []int) {
  constant CollectionInfo_CS_INITIALIZED (line 78) | CollectionInfo_CS_INITIALIZED CollectionInfo_CollectionStatus = 0
  constant CollectionInfo_CS_SERVING (line 79) | CollectionInfo_CS_SERVING     CollectionInfo_CollectionStatus = 1
  constant CollectionInfo_CS_DROPPED (line 80) | CollectionInfo_CS_DROPPED     CollectionInfo_CollectionStatus = 2
  type CollectionStats_SegmentStats_SegmentState (line 124) | type CollectionStats_SegmentStats_SegmentState
    method Enum (line 152) | func (x CollectionStats_SegmentStats_SegmentState) Enum() *CollectionS...
    method String (line 158) | func (x CollectionStats_SegmentStats_SegmentState) String() string {
    method Descriptor (line 162) | func (CollectionStats_SegmentStats_SegmentState) Descriptor() protoref...
    method Type (line 166) | func (CollectionStats_SegmentStats_SegmentState) Type() protoreflect.E...
    method Number (line 170) | func (x CollectionStats_SegmentStats_SegmentState) Number() protorefle...
    method EnumDescriptor (line 175) | func (CollectionStats_SegmentStats_SegmentState) EnumDescriptor() ([]b...
  constant CollectionStats_SegmentStats_SS_CREATED (line 127) | CollectionStats_SegmentStats_SS_CREATED    CollectionStats_SegmentStats_...
  constant CollectionStats_SegmentStats_SS_WRITING (line 128) | CollectionStats_SegmentStats_SS_WRITING    CollectionStats_SegmentStats_...
  constant CollectionStats_SegmentStats_SS_DUMPING (line 129) | CollectionStats_SegmentStats_SS_DUMPING    CollectionStats_SegmentStats_...
  constant CollectionStats_SegmentStats_SS_COMPACTING (line 130) | CollectionStats_SegmentStats_SS_COMPACTING CollectionStats_SegmentStats_...
  constant CollectionStats_SegmentStats_SS_PERSIST (line 131) | CollectionStats_SegmentStats_SS_PERSIST    CollectionStats_SegmentStats_...
  type QueryRequest_QueryType (line 179) | type QueryRequest_QueryType
    method Enum (line 195) | func (x QueryRequest_QueryType) Enum() *QueryRequest_QueryType {
    method String (line 201) | func (x QueryRequest_QueryType) String() string {
    method Descriptor (line 205) | func (QueryRequest_QueryType) Descriptor() protoreflect.EnumDescriptor {
    method Type (line 209) | func (QueryRequest_QueryType) Type() protoreflect.EnumType {
    method Number (line 213) | func (x QueryRequest_QueryType) Number() protoreflect.EnumNumber {
    method EnumDescriptor (line 218) | func (QueryRequest_QueryType) EnumDescriptor() ([]byte, []int) {
  constant QueryRequest_QT_KNN (line 182) | QueryRequest_QT_KNN QueryRequest_QueryType = 0
  type CollectionConfig (line 222) | type CollectionConfig struct
    method Reset (line 234) | func (x *CollectionConfig) Reset() {
    method String (line 243) | func (x *CollectionConfig) String() string {
    method ProtoMessage (line 247) | func (*CollectionConfig) ProtoMessage() {}
    method ProtoReflect (line 249) | func (x *CollectionConfig) ProtoReflect() protoreflect.Message {
    method Descriptor (line 262) | func (*CollectionConfig) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 266) | func (x *CollectionConfig) GetCollectionName() string {
    method GetMaxDocsPerSegment (line 273) | func (x *CollectionConfig) GetMaxDocsPerSegment() uint64 {
    method GetForwardColumnNames (line 280) | func (x *CollectionConfig) GetForwardColumnNames() []string {
    method GetIndexColumnParams (line 287) | func (x *CollectionConfig) GetIndexColumnParams() []*CollectionConfig_...
    method GetRepositoryConfig (line 294) | func (x *CollectionConfig) GetRepositoryConfig() *CollectionConfig_Rep...
  type CollectionName (line 301) | type CollectionName struct
    method Reset (line 309) | func (x *CollectionName) Reset() {
    method String (line 318) | func (x *CollectionName) String() string {
    method ProtoMessage (line 322) | func (*CollectionName) ProtoMessage() {}
    method ProtoReflect (line 324) | func (x *CollectionName) ProtoReflect() protoreflect.Message {
    method Descriptor (line 337) | func (*CollectionName) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 341) | func (x *CollectionName) GetCollectionName() string {
  type LsnContext (line 348) | type LsnContext struct
    method Reset (line 357) | func (x *LsnContext) Reset() {
    method String (line 366) | func (x *LsnContext) String() string {
    method ProtoMessage (line 370) | func (*LsnContext) ProtoMessage() {}
    method ProtoReflect (line 372) | func (x *LsnContext) ProtoReflect() protoreflect.Message {
    method Descriptor (line 385) | func (*LsnContext) Descriptor() ([]byte, []int) {
    method GetLsn (line 389) | func (x *LsnContext) GetLsn() uint64 {
    method GetContext (line 396) | func (x *LsnContext) GetContext() string {
  type CollectionInfo (line 403) | type CollectionInfo struct
    method Reset (line 417) | func (x *CollectionInfo) Reset() {
    method String (line 426) | func (x *CollectionInfo) String() string {
    method ProtoMessage (line 430) | func (*CollectionInfo) ProtoMessage() {}
    method ProtoReflect (line 432) | func (x *CollectionInfo) ProtoReflect() protoreflect.Message {
    method Descriptor (line 445) | func (*CollectionInfo) Descriptor() ([]byte, []int) {
    method GetConfig (line 449) | func (x *CollectionInfo) GetConfig() *CollectionConfig {
    method GetStatus (line 456) | func (x *CollectionInfo) GetStatus() CollectionInfo_CollectionStatus {
    method GetUuid (line 463) | func (x *CollectionInfo) GetUuid() string {
    method GetLatestLsnContext (line 470) | func (x *CollectionInfo) GetLatestLsnContext() *LsnContext {
    method GetMagicNumber (line 477) | func (x *CollectionInfo) GetMagicNumber() uint64 {
  type DescribeCollectionResponse (line 484) | type DescribeCollectionResponse struct
    method Reset (line 493) | func (x *DescribeCollectionResponse) Reset() {
    method String (line 502) | func (x *DescribeCollectionResponse) String() string {
    method ProtoMessage (line 506) | func (*DescribeCollectionResponse) ProtoMessage() {}
    method ProtoReflect (line 508) | func (x *DescribeCollectionResponse) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 521) | func (*DescribeCollectionResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 525) | func (x *DescribeCollectionResponse) GetStatus() *Status {
    method GetCollection (line 532) | func (x *DescribeCollectionResponse) GetCollection() *CollectionInfo {
  type ListCondition (line 539) | type ListCondition struct
    method Reset (line 547) | func (x *ListCondition) Reset() {
    method String (line 556) | func (x *ListCondition) String() string {
    method ProtoMessage (line 560) | func (*ListCondition) ProtoMessage() {}
    method ProtoReflect (line 562) | func (x *ListCondition) ProtoReflect() protoreflect.Message {
    method Descriptor (line 575) | func (*ListCondition) Descriptor() ([]byte, []int) {
    method GetRepositoryName (line 579) | func (x *ListCondition) GetRepositoryName() string {
  type ListCollectionsResponse (line 586) | type ListCollectionsResponse struct
    method Reset (line 595) | func (x *ListCollectionsResponse) Reset() {
    method String (line 604) | func (x *ListCollectionsResponse) String() string {
    method ProtoMessage (line 608) | func (*ListCollectionsResponse) ProtoMessage() {}
    method ProtoReflect (line 610) | func (x *ListCollectionsResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 623) | func (*ListCollectionsResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 627) | func (x *ListCollectionsResponse) GetStatus() *Status {
    method GetCollections (line 634) | func (x *ListCollectionsResponse) GetCollections() []*CollectionInfo {
  type CollectionStats (line 641) | type CollectionStats struct
    method Reset (line 655) | func (x *CollectionStats) Reset() {
    method String (line 664) | func (x *CollectionStats) String() string {
    method ProtoMessage (line 668) | func (*CollectionStats) ProtoMessage() {}
    method ProtoReflect (line 670) | func (x *CollectionStats) ProtoReflect() protoreflect.Message {
    method Descriptor (line 683) | func (*CollectionStats) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 687) | func (x *CollectionStats) GetCollectionName() string {
    method GetCollectionPath (line 694) | func (x *CollectionStats) GetCollectionPath() string {
    method GetTotalDocCount (line 701) | func (x *CollectionStats) GetTotalDocCount() uint64 {
    method GetTotalSegmentCount (line 708) | func (x *CollectionStats) GetTotalSegmentCount() uint64 {
    method GetTotalIndexFileCount (line 715) | func (x *CollectionStats) GetTotalIndexFileCount() uint64 {
    method GetTotalIndexFileSize (line 722) | func (x *CollectionStats) GetTotalIndexFileSize() uint64 {
    method GetSegmentStats (line 729) | func (x *CollectionStats) GetSegmentStats() []*CollectionStats_Segment...
  type StatsCollectionResponse (line 736) | type StatsCollectionResponse struct
    method Reset (line 745) | func (x *StatsCollectionResponse) Reset() {
    method String (line 754) | func (x *StatsCollectionResponse) String() string {
    method ProtoMessage (line 758) | func (*StatsCollectionResponse) ProtoMessage() {}
    method ProtoReflect (line 760) | func (x *StatsCollectionResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 773) | func (*StatsCollectionResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 777) | func (x *StatsCollectionResponse) GetStatus() *Status {
    method GetCollectionStats (line 784) | func (x *StatsCollectionResponse) GetCollectionStats() *CollectionStats {
  type WriteRequest (line 791) | type WriteRequest struct
    method Reset (line 803) | func (x *WriteRequest) Reset() {
    method String (line 812) | func (x *WriteRequest) String() string {
    method ProtoMessage (line 816) | func (*WriteRequest) ProtoMessage() {}
    method ProtoReflect (line 818) | func (x *WriteRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 831) | func (*WriteRequest) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 835) | func (x *WriteRequest) GetCollectionName() string {
    method GetRowMeta (line 842) | func (x *WriteRequest) GetRowMeta() *WriteRequest_RowMeta {
    method GetRows (line 849) | func (x *WriteRequest) GetRows() []*WriteRequest_Row {
    method GetRequestId (line 856) | func (x *WriteRequest) GetRequestId() string {
    method GetMagicNumber (line 863) | func (x *WriteRequest) GetMagicNumber() uint64 {
  type Document (line 870) | type Document struct
    method Reset (line 880) | func (x *Document) Reset() {
    method String (line 889) | func (x *Document) String() string {
    method ProtoMessage (line 893) | func (*Document) ProtoMessage() {}
    method ProtoReflect (line 895) | func (x *Document) ProtoReflect() protoreflect.Message {
    method Descriptor (line 908) | func (*Document) Descriptor() ([]byte, []int) {
    method GetPrimaryKey (line 912) | func (x *Document) GetPrimaryKey() uint64 {
    method GetScore (line 919) | func (x *Document) GetScore() float32 {
    method GetForwardColumnValues (line 926) | func (x *Document) GetForwardColumnValues() []*GenericKeyValue {
  type QueryRequest (line 933) | type QueryRequest struct
    method Reset (line 946) | func (x *QueryRequest) Reset() {
    method String (line 955) | func (x *QueryRequest) String() string {
    method ProtoMessage (line 959) | func (*QueryRequest) ProtoMessage() {}
    method ProtoReflect (line 961) | func (x *QueryRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 974) | func (*QueryRequest) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 978) | func (x *QueryRequest) GetCollectionName() string {
    method GetQueryType (line 985) | func (x *QueryRequest) GetQueryType() QueryRequest_QueryType {
    method GetDebugMode (line 992) | func (x *QueryRequest) GetDebugMode() bool {
    method GetQueryParam (line 999) | func (m *QueryRequest) GetQueryParam() isQueryRequest_QueryParam {
    method GetKnnParam (line 1006) | func (x *QueryRequest) GetKnnParam() *QueryRequest_KnnQueryParam {
  type isQueryRequest_QueryParam (line 1013) | type isQueryRequest_QueryParam interface
  type QueryRequest_KnnParam (line 1017) | type QueryRequest_KnnParam struct
    method isQueryRequest_QueryParam (line 1021) | func (*QueryRequest_KnnParam) isQueryRequest_QueryParam() {}
  type QueryResponse (line 1023) | type QueryResponse struct
    method Reset (line 1034) | func (x *QueryResponse) Reset() {
    method String (line 1043) | func (x *QueryResponse) String() string {
    method ProtoMessage (line 1047) | func (*QueryResponse) ProtoMessage() {}
    method ProtoReflect (line 1049) | func (x *QueryResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1062) | func (*QueryResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 1066) | func (x *QueryResponse) GetStatus() *Status {
    method GetDebugInfo (line 1073) | func (x *QueryResponse) GetDebugInfo() string {
    method GetLatencyUs (line 1080) | func (x *QueryResponse) GetLatencyUs() uint64 {
    method GetResults (line 1087) | func (x *QueryResponse) GetResults() []*QueryResponse_Result {
  type GetDocumentRequest (line 1094) | type GetDocumentRequest struct
    method Reset (line 1104) | func (x *GetDocumentRequest) Reset() {
    method String (line 1113) | func (x *GetDocumentRequest) String() string {
    method ProtoMessage (line 1117) | func (*GetDocumentRequest) ProtoMessage() {}
    method ProtoReflect (line 1119) | func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1132) | func (*GetDocumentRequest) Descriptor() ([]byte, []int) {
    method GetCollectionName (line 1136) | func (x *GetDocumentRequest) GetCollectionName() string {
    method GetPrimaryKey (line 1143) | func (x *GetDocumentRequest) GetPrimaryKey() uint64 {
    method GetDebugMode (line 1150) | func (x *GetDocumentRequest) GetDebugMode() bool {
  type GetDocumentResponse (line 1157) | type GetDocumentResponse struct
    method Reset (line 1167) | func (x *GetDocumentResponse) Reset() {
    method String (line 1176) | func (x *GetDocumentResponse) String() string {
    method ProtoMessage (line 1180) | func (*GetDocumentResponse) ProtoMessage() {}
    method ProtoReflect (line 1182) | func (x *GetDocumentResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1195) | func (*GetDocumentResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 1199) | func (x *GetDocumentResponse) GetStatus() *Status {
    method GetDebugInfo (line 1206) | func (x *GetDocumentResponse) GetDebugInfo() string {
    method GetDocument (line 1213) | func (x *GetDocumentResponse) GetDocument() *Document {
  type GetVersionRequest (line 1220) | type GetVersionRequest struct
    method Reset (line 1226) | func (x *GetVersionRequest) Reset() {
    method String (line 1235) | func (x *GetVersionRequest) String() string {
    method ProtoMessage (line 1239) | func (*GetVersionRequest) ProtoMessage() {}
    method ProtoReflect (line 1241) | func (x *GetVersionRequest) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1254) | func (*GetVersionRequest) Descriptor() ([]byte, []int) {
  type GetVersionResponse (line 1258) | type GetVersionResponse struct
    method Reset (line 1267) | func (x *GetVersionResponse) Reset() {
    method String (line 1276) | func (x *GetVersionResponse) String() string {
    method ProtoMessage (line 1280) | func (*GetVersionResponse) ProtoMessage() {}
    method ProtoReflect (line 1282) | func (x *GetVersionResponse) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1295) | func (*GetVersionResponse) Descriptor() ([]byte, []int) {
    method GetStatus (line 1299) | func (x *GetVersionResponse) GetStatus() *Status {
    method GetVersion (line 1306) | func (x *GetVersionResponse) GetVersion() string {
  type CollectionConfig_IndexColumnParam (line 1313) | type CollectionConfig_IndexColumnParam struct
    method Reset (line 1325) | func (x *CollectionConfig_IndexColumnParam) Reset() {
    method String (line 1334) | func (x *CollectionConfig_IndexColumnParam) String() string {
    method ProtoMessage (line 1338) | func (*CollectionConfig_IndexColumnParam) ProtoMessage() {}
    method ProtoReflect (line 1340) | func (x *CollectionConfig_IndexColumnParam) ProtoReflect() protoreflec...
    method Descriptor (line 1353) | func (*CollectionConfig_IndexColumnParam) Descriptor() ([]byte, []int) {
    method GetColumnName (line 1357) | func (x *CollectionConfig_IndexColumnParam) GetColumnName() string {
    method GetIndexType (line 1364) | func (x *CollectionConfig_IndexColumnParam) GetIndexType() IndexType {
    method GetDataType (line 1371) | func (x *CollectionConfig_IndexColumnParam) GetDataType() DataType {
    method GetDimension (line 1378) | func (x *CollectionConfig_IndexColumnParam) GetDimension() uint32 {
    method GetExtraParams (line 1385) | func (x *CollectionConfig_IndexColumnParam) GetExtraParams() []*KeyVal...
  type CollectionConfig_RepositoryConfig (line 1392) | type CollectionConfig_RepositoryConfig struct
    method Reset (line 1404) | func (x *CollectionConfig_RepositoryConfig) Reset() {
    method String (line 1413) | func (x *CollectionConfig_RepositoryConfig) String() string {
    method ProtoMessage (line 1417) | func (*CollectionConfig_RepositoryConfig) ProtoMessage() {}
    method ProtoReflect (line 1419) | func (x *CollectionConfig_RepositoryConfig) ProtoReflect() protoreflec...
    method Descriptor (line 1432) | func (*CollectionConfig_RepositoryConfig) Descriptor() ([]byte, []int) {
    method GetRepositoryType (line 1436) | func (x *CollectionConfig_RepositoryConfig) GetRepositoryType() Collec...
    method GetRepositoryName (line 1443) | func (x *CollectionConfig_RepositoryConfig) GetRepositoryName() string {
    method GetEntity (line 1450) | func (m *CollectionConfig_RepositoryConfig) GetEntity() isCollectionCo...
    method GetDatabase (line 1457) | func (x *CollectionConfig_RepositoryConfig) GetDatabase() *CollectionC...
  type isCollectionConfig_RepositoryConfig_Entity (line 1464) | type isCollectionConfig_RepositoryConfig_Entity interface
  type CollectionConfig_RepositoryConfig_Database_ (line 1468) | type CollectionConfig_RepositoryConfig_Database_ struct
    method isCollectionConfig_RepositoryConfig_Entity (line 1472) | func (*CollectionConfig_RepositoryConfig_Database_) isCollectionConfig...
  type CollectionConfig_RepositoryConfig_Database (line 1474) | type CollectionConfig_RepositoryConfig_Database struct
    method Reset (line 1485) | func (x *CollectionConfig_RepositoryConfig_Database) Reset() {
    method String (line 1494) | func (x *CollectionConfig_RepositoryConfig_Database) String() string {
    method ProtoMessage (line 1498) | func (*CollectionConfig_RepositoryConfig_Database) ProtoMessage() {}
    method ProtoReflect (line 1500) | func (x *CollectionConfig_RepositoryConfig_Database) ProtoReflect() pr...
    method Descriptor (line 1513) | func (*CollectionConfig_RepositoryConfig_Database) Descriptor() ([]byt...
    method GetConnectionUri (line 1517) | func (x *CollectionConfig_RepositoryConfig_Database) GetConnectionUri(...
    method GetTableName (line 1524) | func (x *CollectionConfig_RepositoryConfig_Database) GetTableName() st...
    method GetUser (line 1531) | func (x *CollectionConfig_RepositoryConfig_Database) GetUser() string {
    method GetPassword (line 1538) | func (x *CollectionConfig_RepositoryConfig_Database) GetPassword() str...
  type CollectionStats_SegmentStats (line 1545) | type CollectionStats_SegmentStats struct
    method Reset (line 1566) | func (x *CollectionStats_SegmentStats) Reset() {
    method String (line 1575) | func (x *CollectionStats_SegmentStats) String() string {
    method ProtoMessage (line 1579) | func (*CollectionStats_SegmentStats) ProtoMessage() {}
    method ProtoReflect (line 1581) | func (x *CollectionStats_SegmentStats) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 1594) | func (*CollectionStats_SegmentStats) Descriptor() ([]byte, []int) {
    method GetSegmentId (line 1598) | func (x *CollectionStats_SegmentStats) GetSegmentId() uint32 {
    method GetState (line 1605) | func (x *CollectionStats_SegmentStats) GetState() CollectionStats_Segm...
    method GetDocCount (line 1612) | func (x *CollectionStats_SegmentStats) GetDocCount() uint64 {
    method GetIndexFileCount (line 1619) | func (x *CollectionStats_SegmentStats) GetIndexFileCount() uint64 {
    method GetIndexFileSize (line 1626) | func (x *CollectionStats_SegmentStats) GetIndexFileSize() uint64 {
    method GetMinDocId (line 1633) | func (x *CollectionStats_SegmentStats) GetMinDocId() uint64 {
    method GetMaxDocId (line 1640) | func (x *CollectionStats_SegmentStats) GetMaxDocId() uint64 {
    method GetMinPrimaryKey (line 1647) | func (x *CollectionStats_SegmentStats) GetMinPrimaryKey() uint64 {
    method GetMaxPrimaryKey (line 1654) | func (x *CollectionStats_SegmentStats) GetMaxPrimaryKey() uint64 {
    method GetMinTimestamp (line 1661) | func (x *CollectionStats_SegmentStats) GetMinTimestamp() uint64 {
    method GetMaxTimestamp (line 1668) | func (x *CollectionStats_SegmentStats) GetMaxTimestamp() uint64 {
    method GetMinLsn (line 1675) | func (x *CollectionStats_SegmentStats) GetMinLsn() uint64 {
    method GetMaxLsn (line 1682) | func (x *CollectionStats_SegmentStats) GetMaxLsn() uint64 {
    method GetSegmentPath (line 1689) | func (x *CollectionStats_SegmentStats) GetSegmentPath() string {
  type WriteRequest_Row (line 1696) | type WriteRequest_Row struct
    method Reset (line 1708) | func (x *WriteRequest_Row) Reset() {
    method String (line 1717) | func (x *WriteRequest_Row) String() string {
    method ProtoMessage (line 1721) | func (*WriteRequest_Row) ProtoMessage() {}
    method ProtoReflect (line 1723) | func (x *WriteRequest_Row) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1736) | func (*WriteRequest_Row) Descriptor() ([]byte, []int) {
    method GetPrimaryKey (line 1740) | func (x *WriteRequest_Row) GetPrimaryKey() uint64 {
    method GetOperationType (line 1747) | func (x *WriteRequest_Row) GetOperationType() OperationType {
    method GetForwardColumnValues (line 1754) | func (x *WriteRequest_Row) GetForwardColumnValues() *GenericValueList {
    method GetIndexColumnValues (line 1761) | func (x *WriteRequest_Row) GetIndexColumnValues() *GenericValueList {
    method GetLsnContext (line 1768) | func (x *WriteRequest_Row) GetLsnContext() *LsnContext {
  type WriteRequest_IndexColumnMeta (line 1775) | type WriteRequest_IndexColumnMeta struct
    method Reset (line 1785) | func (x *WriteRequest_IndexColumnMeta) Reset() {
    method String (line 1794) | func (x *WriteRequest_IndexColumnMeta) String() string {
    method ProtoMessage (line 1798) | func (*WriteRequest_IndexColumnMeta) ProtoMessage() {}
    method ProtoReflect (line 1800) | func (x *WriteRequest_IndexColumnMeta) ProtoReflect() protoreflect.Mes...
    method Descriptor (line 1813) | func (*WriteRequest_IndexColumnMeta) Descriptor() ([]byte, []int) {
    method GetColumnName (line 1817) | func (x *WriteRequest_IndexColumnMeta) GetColumnName() string {
    method GetDataType (line 1824) | func (x *WriteRequest_IndexColumnMeta) GetDataType() DataType {
    method GetDimension (line 1831) | func (x *WriteRequest_IndexColumnMeta) GetDimension() uint32 {
  type WriteRequest_RowMeta (line 1838) | type WriteRequest_RowMeta struct
    method Reset (line 1847) | func (x *WriteRequest_RowMeta) Reset() {
    method String (line 1856) | func (x *WriteRequest_RowMeta) String() string {
    method ProtoMessage (line 1860) | func (*WriteRequest_RowMeta) ProtoMessage() {}
    method ProtoReflect (line 1862) | func (x *WriteRequest_RowMeta) ProtoReflect() protoreflect.Message {
    method Descriptor (line 1875) | func (*WriteRequest_RowMeta) Descriptor() ([]byte, []int) {
    method GetForwardColumnNames (line 1879) | func (x *WriteRequest_RowMeta) GetForwardColumnNames() []string {
    method GetIndexColumnMetas (line 1886) | func (x *WriteRequest_RowMeta) GetIndexColumnMetas() []*WriteRequest_I...
  type QueryRequest_KnnQueryParam (line 1893) | type QueryRequest_KnnQueryParam struct
    method Reset (line 1912) | func (x *QueryRequest_KnnQueryParam) Reset() {
    method String (line 1921) | func (x *QueryRequest_KnnQueryParam) String() string {
    method ProtoMessage (line 1925) | func (*QueryRequest_KnnQueryParam) ProtoMessage() {}
    method ProtoReflect (line 1927) | func (x *QueryRequest_KnnQueryParam) ProtoReflect() protoreflect.Messa...
    method Descriptor (line 1940) | func (*QueryRequest_KnnQueryParam) Descriptor() ([]byte, []int) {
    method GetColumnName (line 1944) | func (x *QueryRequest_KnnQueryParam) GetColumnName() string {
    method GetTopk (line 1951) | func (x *QueryRequest_KnnQueryParam) GetTopk() uint32 {
    method GetFeaturesValue (line 1958) | func (m *QueryRequest_KnnQueryParam) GetFeaturesValue() isQueryRequest...
    method GetFeatures (line 1965) | func (x *QueryRequest_KnnQueryParam) GetFeatures() []byte {
    method GetMatrix (line 1972) | func (x *QueryRequest_KnnQueryParam) GetMatrix() string {
    method GetBatchCount (line 1979) | func (x *QueryRequest_KnnQueryParam) GetBatchCount() uint32 {
    method GetDimension (line 1986) | func (x *QueryRequest_KnnQueryParam) GetDimension() uint32 {
    method GetDataType (line 1993) | func (x *QueryRequest_KnnQueryParam) GetDataType() DataType {
    method GetRadius (line 2000) | func (x *QueryRequest_KnnQueryParam) GetRadius() float32 {
    method GetIsLinear (line 2007) | func (x *QueryRequest_KnnQueryParam) GetIsLinear() bool {
    method GetExtraParams (line 2014) | func (x *QueryRequest_KnnQueryParam) GetExtraParams() []*KeyValuePair {
  type isQueryRequest_KnnQueryParam_FeaturesValue (line 2021) | type isQueryRequest_KnnQueryParam_FeaturesValue interface
  type QueryRequest_KnnQueryParam_Features (line 2025) | type QueryRequest_KnnQueryParam_Features struct
    method isQueryRequest_KnnQueryParam_FeaturesValue (line 2033) | func (*QueryRequest_KnnQueryParam_Features) isQueryRequest_KnnQueryPar...
  type QueryRequest_KnnQueryParam_Matrix (line 2029) | type QueryRequest_KnnQueryParam_Matrix struct
    method isQueryRequest_KnnQueryParam_FeaturesValue (line 2035) | func (*QueryRequest_KnnQueryParam_Matrix) isQueryRequest_KnnQueryParam...
  type QueryResponse_Result (line 2037) | type QueryResponse_Result struct
    method Reset (line 2045) | func (x *QueryResponse_Result) Reset() {
    method String (line 2054) | func (x *QueryResponse_Result) String() string {
    method ProtoMessage (line 2058) | func (*QueryResponse_Result) ProtoMessage() {}
    method ProtoReflect (line 2060) | func (x *QueryResponse_Result) ProtoReflect() protoreflect.Message {
    method Descriptor (line 2073) | func (*QueryResponse_Result) Descriptor() ([]byte, []int) {
    method GetDocuments (line 2077) | func (x *QueryResponse_Result) GetDocuments() []*Document {
  function file_proto_proxima_be_proto_rawDescGZIP (line 2527) | func file_proto_proxima_be_proto_rawDescGZIP() []byte {
  function init (line 2654) | func init() { file_proto_proxima_be_proto_init() }
  function file_proto_proxima_be_proto_init (line 2655) | func file_proto_proxima_be_proto_init() {
  constant _ (line 3011) | _ = grpc.SupportPackageIsVersion6
  type ProximaServiceClient (line 3016) | type ProximaServiceClient interface
  type proximaServiceClient (line 3037) | type proximaServiceClient struct
    method CreateCollection (line 3045) | func (c *proximaServiceClient) CreateCollection(ctx context.Context, i...
    method DropCollection (line 3054) | func (c *proximaServiceClient) DropCollection(ctx context.Context, in ...
    method DescribeCollection (line 3063) | func (c *proximaServiceClient) DescribeCollection(ctx context.Context,...
    method ListCollections (line 3072) | func (c *proximaServiceClient) ListCollections(ctx context.Context, in...
    method StatsCollection (line 3081) | func (c *proximaServiceClient) StatsCollection(ctx context.Context, in...
    method Write (line 3090) | func (c *proximaServiceClient) Write(ctx context.Context, in *WriteReq...
    method Query (line 3099) | func (c *proximaServiceClient) Query(ctx context.Context, in *QueryReq...
    method GetDocumentByKey (line 3108) | func (c *proximaServiceClient) GetDocumentByKey(ctx context.Context, i...
    method GetVersion (line 3117) | func (c *proximaServiceClient) GetVersion(ctx context.Context, in *Get...
  function NewProximaServiceClient (line 3041) | func NewProximaServiceClient(cc grpc.ClientConnInterface) ProximaService...
  type ProximaServiceServer (line 3127) | type ProximaServiceServer interface
  type UnimplementedProximaServiceServer (line 3149) | type UnimplementedProximaServiceServer struct
    method CreateCollection (line 3152) | func (*UnimplementedProximaServiceServer) CreateCollection(context.Con...
    method DropCollection (line 3155) | func (*UnimplementedProximaServiceServer) DropCollection(context.Conte...
    method DescribeCollection (line 3158) | func (*UnimplementedProximaServiceServer) DescribeCollection(context.C...
    method ListCollections (line 3161) | func (*UnimplementedProximaServiceServer) ListCollections(context.Cont...
    method StatsCollection (line 3164) | func (*UnimplementedProximaServiceServer) StatsCollection(context.Cont...
    method Write (line 3167) | func (*UnimplementedProximaServiceServer) Write(context.Context, *Writ...
    method Query (line 3170) | func (*UnimplementedProximaServiceServer) Query(context.Context, *Quer...
    method GetDocumentByKey (line 3173) | func (*UnimplementedProximaServiceServer) GetDocumentByKey(context.Con...
    method GetVersion (line 3176) | func (*UnimplementedProximaServiceServer) GetVersion(context.Context, ...
  function RegisterProximaServiceServer (line 3180) | func RegisterProximaServiceServer(s *grpc.Server, srv ProximaServiceServ...
  function _ProximaService_CreateCollection_Handler (line 3184) | func _ProximaService_CreateCollection_Handler(srv interface{}, ctx conte...
  function _ProximaService_DropCollection_Handler (line 3202) | func _ProximaService_DropCollection_Handler(srv interface{}, ctx context...
  function _ProximaService_DescribeCollection_Handler (line 3220) | func _ProximaService_DescribeCollection_Handler(srv interface{}, ctx con...
  function _ProximaService_ListCollections_Handler (line 3238) | func _ProximaService_ListCollections_Handler(srv interface{}, ctx contex...
  function _ProximaService_StatsCollection_Handler (line 3256) | func _ProximaService_StatsCollection_Handler(srv interface{}, ctx contex...
  function _ProximaService_Write_Handler (line 3274) | func _ProximaService_Write_Handler(srv interface{}, ctx context.Context,...
  function _ProximaService_Query_Handler (line 3292) | func _ProximaService_Query_Handler(srv interface{}, ctx context.Context,...
  function _ProximaService_GetDocumentByKey_Handler (line 3310) | func _ProximaService_GetDocumentByKey_Handler(srv interface{}, ctx conte...
  function _ProximaService_GetVersion_Handler (line 3328) | func _ProximaService_GetVersion_Handler(srv interface{}, ctx context.Con...
  type HttpProximaServiceClient (line 3394) | type HttpProximaServiceClient interface
  type httpProximaServiceClient (line 3438) | type httpProximaServiceClient struct
    method Collection (line 3446) | func (c *httpProximaServiceClient) Collection(ctx context.Context, in ...
    method StatsCollection (line 3455) | func (c *httpProximaServiceClient) StatsCollection(ctx context.Context...
    method Write (line 3464) | func (c *httpProximaServiceClient) Write(ctx context.Context, in *Http...
    method Query (line 3473) | func (c *httpProximaServiceClient) Query(ctx context.Context, in *Http...
    method GetDocumentByKey (line 3482) | func (c *httpProximaServiceClient) GetDocumentByKey(ctx context.Contex...
    method ListCollections (line 3491) | func (c *httpProximaServiceClient) ListCollections(ctx context.Context...
    method GetVersion (line 3500) | func (c *httpProximaServiceClient) GetVersion(ctx context.Context, in ...
  function NewHttpProximaServiceClient (line 3442) | func NewHttpProximaServiceClient(cc grpc.ClientConnInterface) HttpProxim...
  type HttpProximaServiceServer (line 3510) | type HttpProximaServiceServer interface
  type UnimplementedHttpProximaServiceServer (line 3555) | type UnimplementedHttpProximaServiceServer struct
    method Collection (line 3558) | func (*UnimplementedHttpProximaServiceServer) Collection(context.Conte...
    method StatsCollection (line 3561) | func (*UnimplementedHttpProximaServiceServer) StatsCollection(context....
    method Write (line 3564) | func (*UnimplementedHttpProximaServiceServer) Write(context.Context, *...
    method Query (line 3567) | func (*UnimplementedHttpProximaServiceServer) Query(context.Context, *...
    method GetDocumentByKey (line 3570) | func (*UnimplementedHttpProximaServiceServer) GetDocumentByKey(context...
    method ListCollections (line 3573) | func (*UnimplementedHttpProximaServiceServer) ListCollections(context....
    method GetVersion (line 3576) | func (*UnimplementedHttpProximaServiceServer) GetVersion(context.Conte...
  function RegisterHttpProximaServiceServer (line 3580) | func RegisterHttpProximaServiceServer(s *grpc.Server, srv HttpProximaSer...
  function _HttpProximaService_Collection_Handler (line 3584) | func _HttpProximaService_Collection_Handler(srv interface{}, ctx context...
  function _HttpProximaService_StatsCollection_Handler (line 3602) | func _HttpProximaService_StatsCollection_Handler(srv interface{}, ctx co...
  function _HttpProximaService_Write_Handler (line 3620) | func _HttpProximaService_Write_Handler(srv interface{}, ctx context.Cont...
  function _HttpProximaService_Query_Handler (line 3638) | func _HttpProximaService_Query_Handler(srv interface{}, ctx context.Cont...
  function _HttpProximaService_GetDocumentByKey_Handler (line 3656) | func _HttpProximaService_GetDocumentByKey_Handler(srv interface{}, ctx c...
  function _HttpProximaService_ListCollections_Handler (line 3674) | func _HttpProximaService_ListCollections_Handler(srv interface{}, ctx co...
  function _HttpProximaService_GetVersion_Handler (line 3692) | func _HttpProximaService_GetVersion_Handler(srv interface{}, ctx context...

FILE: sdk/go/status.go
  type Status (line 30) | type Status struct
    method OK (line 38) | func (s *Status) OK() bool {
    method IsGrpcError (line 42) | func (s *Status) IsGrpcError() bool {
    method Error (line 47) | func (s *Status) Error() string {
    method String (line 57) | func (s *Status) String() string {
  function WrapStatus (line 65) | func WrapStatus(err error) (*Status, error) {

FILE: sdk/go/types.go
  type Version (line 32) | type Version struct
    method Compatible (line 40) | func (ver *Version) Compatible() bool {
    method String (line 45) | func (version *Version) String() string {
  type Address (line 53) | type Address struct
    method String (line 61) | func (address *Address) String() string {
    method address (line 68) | func (addr *Address) address() string {
  type ColumnIndex (line 78) | type ColumnIndex struct
    method String (line 92) | func (column *ColumnIndex) String() string {
  type Repository (line 100) | type Repository struct
  type DatabaseRepository (line 110) | type DatabaseRepository struct
    method String (line 129) | func (repo *DatabaseRepository) String() string {
  type CollectionConfig (line 137) | type CollectionConfig struct
    method String (line 151) | func (config *CollectionConfig) String() string {
  type LsnContext (line 159) | type LsnContext struct
    method String (line 167) | func (context *LsnContext) String() string {
  type CollectionInfo (line 175) | type CollectionInfo struct
    method String (line 189) | func (info *CollectionInfo) String() string {
  type Range (line 197) | type Range struct
  type SegmentStat (line 205) | type SegmentStat struct
    method String (line 229) | func (stat *SegmentStat) String() string {
  type CollectionStat (line 237) | type CollectionStat struct
    method String (line 255) | func (stat *CollectionStat) String() string {
  type Row (line 263) | type Row struct
  type RowMeta (line 277) | type RowMeta struct
  type WriteRequest (line 285) | type WriteRequest struct
  type Document (line 299) | type Document struct
    method String (line 309) | func (doc *Document) String() string {
    method GetForward (line 316) | func (doc *Document) GetForward(name string) (reflect.Value, error) {
  type QueryResponse (line 324) | type QueryResponse struct
    method String (line 334) | func (resp *QueryResponse) String() string {

FILE: sdk/go/utils.go
  function createAcceptableTypes (line 36) | func createAcceptableTypes() bitmap.Bitmap {
  function createAcceptableFeatureTypes (line 52) | func createAcceptableFeatureTypes() bitmap.Bitmap {
  function indexTypeApplier (line 61) | func indexTypeApplier(column *pb.CollectionConfig_IndexColumnParam) {
  function dataTypeApplier (line 67) | func dataTypeApplier(column *pb.CollectionConfig_IndexColumnParam) {
  function acceptableValueTypes (line 88) | func acceptableValueTypes(value interface{}) bool {
  function acceptableFeatureTypes (line 93) | func acceptableFeatureTypes(t reflect.Type) bool {
  function isSlice (line 97) | func isSlice(t reflect.Type) bool {
  function isArray (line 101) | func isArray(t reflect.Type) bool {
  function isSliceOrArray (line 105) | func isSliceOrArray(t reflect.Type) bool {
  function inferVectorFeatureType (line 109) | func inferVectorFeatureType(features interface{}) (reflect.Kind, bool) {
  function inferMatrixFeatureType (line 119) | func inferMatrixFeatureType(features interface{}) (reflect.Kind, bool) {
  function inferMatrixDimension (line 129) | func inferMatrixDimension(matrix interface{}) (int, int, error) {
  function inferFeatures (line 147) | func inferFeatures(features interface{}) (pb.DataType, int, int, error) {
  function applyDefaultValue (line 177) | func applyDefaultValue(column *pb.CollectionConfig_IndexColumnParam) *pb...
  function buildPBCollectionConfig (line 184) | func buildPBCollectionConfig(config *CollectionConfig) (*pb.CollectionCo...
  function buildRepositoryConfigFromPB (line 228) | func buildRepositoryConfigFromPB(in *pb.CollectionConfig_RepositoryConfi...
  function buildCollectionInfoFromPB (line 252) | func buildCollectionInfoFromPB(collection *pb.CollectionInfo) (*Collecti...
  function buildCollectionStatFromPB (line 292) | func buildCollectionStatFromPB(in *pb.CollectionStats) (*CollectionStat,...
  function serializeSlice (line 332) | func serializeSlice(in reflect.Value) ([]byte, error) {
  function buildPBGenericValue (line 343) | func buildPBGenericValue(value interface{}) *pb.GenericValue {
  function buildGenericValueList (line 400) | func buildGenericValueList(in []interface{}, out *pb.GenericValueList) e...
  function buildPBWriteRequest (line 411) | func buildPBWriteRequest(req *WriteRequest) (*pb.WriteRequest, error) {
  function serializeFeature (line 473) | func serializeFeature(batch int, features interface{}) (*bytes.Buffer, e...
  function buildPBQueryRequest (line 491) | func buildPBQueryRequest(collection string, column string, features inte...
  function buildDocumentFromPB (line 538) | func buildDocumentFromPB(doc *pb.Document) *Document {
  function buildQueryResponseFromPB (line 570) | func buildQueryResponseFromPB(resp *pb.QueryResponse) (*QueryResponse, e...

FILE: sdk/go/utils_test.go
  function TestAcceptableFeatureType (line 30) | func TestAcceptableFeatureType(t *testing.T) {
  function TestIsSlice (line 36) | func TestIsSlice(t *testing.T) {
  function TestIsArray (line 48) | func TestIsArray(t *testing.T) {
  function TestIsSliceOrArray (line 60) | func TestIsSliceOrArray(t *testing.T) {
  function TestInferVectorFeature (line 72) | func TestInferVectorFeature(t *testing.T) {
  function TestInferMatrixFeatureType (line 109) | func TestInferMatrixFeatureType(t *testing.T) {
  function TestInferMatrixDimension (line 144) | func TestInferMatrixDimension(t *testing.T) {
  function TestInferFeatures (line 159) | func TestInferFeatures(t *testing.T) {

FILE: sdk/go/version.go
  constant VERSION (line 26) | VERSION = "0.2.0"

FILE: sdk/java/example/src/main/java/com/alibaba/example/BenchClient.java
  class BenchClient (line 40) | public class BenchClient {
    class ThreadWorker (line 52) | public static class ThreadWorker implements Runnable {
      type WorkerType (line 65) | public enum WorkerType {
      method ThreadWorker (line 70) | public ThreadWorker(WorkerType workerType, ProximaSearchClient clien...
      method ThreadWorker (line 85) | public ThreadWorker(WorkerType workerType, ProximaSearchClient clien...
      method insert (line 101) | private void insert() {
      method search (line 130) | private void search() {
      method run (line 155) | public void run() {
    method BenchClient (line 163) | public BenchClient(Map<String, String> kv) {
    method init (line 168) | public boolean init() {
    method execute (line 210) | public boolean execute() {
    method createCollection (line 232) | public boolean createCollection() {
    method dropCollection (line 278) | public void dropCollection() {
    method describeCollection (line 287) | public void describeCollection() {
    method statsCollection (line 304) | public void statsCollection() {
    method loadTxtFile (line 316) | private boolean loadTxtFile(String fileName) {
    method loadVecs2File (line 368) | private boolean loadVecs2File(String fileName) {
    method loadFileData (line 415) | private boolean loadFileData() {
    method insertCollection (line 431) | public void insertCollection() {
    method searchCollection (line 472) | public void searchCollection() {
    method main (line 530) | public static void main(String[] args) {

FILE: sdk/java/example/src/main/java/com/alibaba/example/TestExample.java
  class TestExample (line 31) | public class TestExample {
    method main (line 34) | public static void main(String[] args) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionConfig.java
  class CollectionConfig (line 29) | public class CollectionConfig {
    method CollectionConfig (line 36) | private CollectionConfig(Builder builder) {
    method getCollectionName (line 44) | public String getCollectionName() {
    method getMaxDocsPerSegment (line 48) | public long getMaxDocsPerSegment() {
    method getForwardColumnNames (line 52) | public List<String> getForwardColumnNames() {
    method getIndexColumnParams (line 56) | public List<IndexColumnParam> getIndexColumnParams() {
    method getDatabaseRepository (line 60) | public DatabaseRepository getDatabaseRepository() {
    method newBuilder (line 68) | public static Builder newBuilder() {
    class Builder (line 75) | public static class Builder {
      method Builder (line 88) | public Builder() {
      method Builder (line 96) | public Builder(String collectionName, List<IndexColumnParam> indexCo...
      method withCollectionName (line 106) | public Builder withCollectionName(String collectionName) {
      method withForwardColumnNames (line 116) | public Builder withForwardColumnNames(List<String> forwardColumnName...
      method withMaxDocsPerSegment (line 128) | public Builder withMaxDocsPerSegment(long maxDocsPerSegment) {
      method withIndexColumnParams (line 140) | public Builder withIndexColumnParams(List<IndexColumnParam> indexCol...
      method withDatabaseRepository (line 150) | public Builder withDatabaseRepository(DatabaseRepository databaseRep...
      method addForwardColumn (line 160) | public Builder addForwardColumn(String forwardColumn) {
      method addIndexColumnParam (line 170) | public Builder addIndexColumnParam(IndexColumnParam indexParam) {
      method addIndexColumnParam (line 182) | public Builder addIndexColumnParam(String columnName, DataType dataT...
      method build (line 195) | public CollectionConfig build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionInfo.java
  class CollectionInfo (line 27) | public class CollectionInfo {
    method CollectionInfo (line 34) | private CollectionInfo(Builder builder) {
    method getCollectionConfig (line 42) | public CollectionConfig getCollectionConfig() {
    method getCollectionStatus (line 46) | public CollectionStatus getCollectionStatus() {
    method getUuid (line 50) | public String getUuid() {
    method getLatestLsnContext (line 54) | public LsnContext getLatestLsnContext() {
    method getMagicNumber (line 58) | public long getMagicNumber() {
    method newBuilder (line 63) | public static Builder newBuilder() {
    class Builder (line 70) | public static class Builder {
      method Builder (line 83) | public Builder() {
      method withCollectionConfig (line 91) | public Builder withCollectionConfig(CollectionConfig collectionConfi...
      method withCollectionStatus (line 101) | public Builder withCollectionStatus(CollectionStatus collectionStatu...
      method withUuid (line 111) | public Builder withUuid(String uuid) {
      method withLatestLsnContext (line 121) | public Builder withLatestLsnContext(LsnContext latestLsnContext) {
      method withMagicNumber (line 131) | public Builder withMagicNumber(long magicNumber) {
      method build (line 140) | public CollectionInfo build() {
    type CollectionStatus (line 148) | public enum CollectionStatus {
      method CollectionStatus (line 168) | CollectionStatus(int value) {
      method getValue (line 172) | public int getValue() {
      method valueOf (line 176) | public static CollectionStatus valueOf(int value) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/CollectionStats.java
  class CollectionStats (line 30) | public class CollectionStats {
    method CollectionStats (line 39) | public CollectionStats(Builder builder) {
    method getCollectionName (line 49) | public String getCollectionName() {
    method getCollectionPath (line 53) | public String getCollectionPath() {
    method getTotalDocCount (line 57) | public long getTotalDocCount() {
    method getTotalSegmentCount (line 61) | public long getTotalSegmentCount() {
    method getTotalIndexFileCount (line 65) | public long getTotalIndexFileCount() {
    method getTotalIndexFileSize (line 69) | public long getTotalIndexFileSize() {
    method getSegmentStats (line 73) | public List<SegmentStats> getSegmentStats() {
    method getSegmentStatsCount (line 81) | public int getSegmentStatsCount() {
    method getSegmentStats (line 93) | public SegmentStats getSegmentStats(int index) {
    method newBuilder (line 101) | public static Builder newBuilder() {
    class Builder (line 108) | public static class Builder {
      method Builder (line 121) | public Builder() {
      method withCollectionName (line 129) | public Builder withCollectionName(String collectionName) {
      method withCollectionPath (line 139) | public Builder withCollectionPath(String collectionPath) {
      method withTotalDocCount (line 149) | public Builder withTotalDocCount(long totalDocCount) {
      method withTotalSegmentCount (line 159) | public Builder withTotalSegmentCount(long totalSegmentCount) {
      method withTotalIndexFileCount (line 169) | public Builder withTotalIndexFileCount(long totalIndexFileCount) {
      method withTotalIndexFileSize (line 179) | public Builder withTotalIndexFileSize(long totalIndexFileSize) {
      method withSegmentStats (line 189) | public Builder withSegmentStats(List<SegmentStats> segmentStatsList) {
      method addSegmentStats (line 199) | public Builder addSegmentStats(SegmentStats segmentStats) {
      method build (line 208) | public CollectionStats build() {
    type SegmentState (line 216) | public enum SegmentState {
      method SegmentState (line 244) | SegmentState(int value) {
      method getValue (line 248) | public int getValue() {
      method valueOf (line 252) | public static SegmentState valueOf(int value) {
    class SegmentStats (line 273) | public static class SegmentStats {
      method SegmentStats (line 289) | private SegmentStats(Builder builder) {
      method getSegmentId (line 306) | public int getSegmentId() {
      method getSegmentState (line 310) | public SegmentState getSegmentState() {
      method getDocDount (line 314) | public long getDocDount() {
      method getIndexFileCount (line 318) | public long getIndexFileCount() {
      method getIndexFileSize (line 322) | public long getIndexFileSize() {
      method getMinDocId (line 326) | public long getMinDocId() {
      method getMaxDocId (line 330) | public long getMaxDocId() {
      method getMinPrimaryKey (line 334) | public long getMinPrimaryKey() {
      method getMaxPrimaryKey (line 338) | public long getMaxPrimaryKey() {
      method getMinTimestamp (line 342) | public long getMinTimestamp() {
      method getMaxTimestamp (line 346) | public long getMaxTimestamp() {
      method getMinLsn (line 350) | public long getMinLsn() {
      method getMaxLsn (line 354) | public long getMaxLsn() {
      method getSegmentPath (line 358) | public String getSegmentPath() {
      method newBuilder (line 362) | public static Builder newBuilder() {
      class Builder (line 369) | public static class Builder {
        method Builder (line 385) | public Builder() {
        method withSegmentId (line 388) | public Builder withSegmentId(int segmentId) {
        method withSegmentState (line 393) | public Builder withSegmentState(SegmentState segmentState) {
        method withDocDount (line 398) | public Builder withDocDount(long docDount) {
        method withIndexFileCount (line 403) | public Builder withIndexFileCount(long indexFileCount) {
        method withIndexFileSize (line 408) | public Builder withIndexFileSize(long indexFileSize) {
        method withMinDocId (line 413) | public Builder withMinDocId(long minDocId) {
        method withMaxDocId (line 418) | public Builder withMaxDocId(long maxDocId) {
        method withMinPrimaryKey (line 423) | public Builder withMinPrimaryKey(long minPrimaryKey) {
        method withMaxPrimaryKey (line 428) | public Builder withMaxPrimaryKey(long maxPrimaryKey) {
        method withMinTimestamp (line 433) | public Builder withMinTimestamp(long minTimestamp) {
        method withMaxTimestamp (line 438) | public Builder withMaxTimestamp(long maxTimestamp) {
        method withMinLsn (line 443) | public Builder withMinLsn(long minLsn) {
        method withMaxLsn (line 448) | public Builder withMaxLsn(long maxLsn) {
        method withSegmentPath (line 453) | public Builder withSegmentPath(String segmentPath) {
        method build (line 462) | public SegmentStats build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ConnectParam.java
  class ConnectParam (line 29) | public class ConnectParam {
    method ConnectParam (line 45) | private ConnectParam(Builder builder) {
    method getHost (line 58) | public String getHost() {
    method getPort (line 66) | public int getPort() {
    method getTimeout (line 75) | public long getTimeout(TimeUnit timeUnit) {
    method getIdleTimeout (line 84) | public long getIdleTimeout(TimeUnit timeUnit) {
    method getKeepAliveTime (line 93) | public long getKeepAliveTime(TimeUnit timeUnit) {
    method getKeepAliveTimeout (line 102) | public long getKeepAliveTimeout(TimeUnit timeUnit) {
    method newBuilder (line 110) | public static Builder newBuilder() {
    class Builder (line 117) | public static class Builder {
      method build (line 129) | public ConnectParam build() {
      method withHost (line 138) | public Builder withHost(String host) {
      method withPort (line 148) | public Builder withPort(int port) {
      method withTimeout (line 159) | public Builder withTimeout(long timeout, TimeUnit timeUnit) {
      method withIdleTimeout (line 170) | public Builder withIdleTimeout(long idleTimeout, TimeUnit timeUnit) {
      method withKeepAliveTimeNanos (line 181) | public Builder withKeepAliveTimeNanos(long keepAliveTime, TimeUnit t...
      method withKeepAliveTimeoutNanos (line 192) | public Builder withKeepAliveTimeoutNanos(long keepAliveTimeout, Time...

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DataType.java
  type DataType (line 27) | public enum DataType {
    method DataType (line 104) | DataType(int value) {
    method getValue (line 108) | public int getValue() {
    method valueOf (line 112) | public static DataType valueOf(int value) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DatabaseRepository.java
  class DatabaseRepository (line 27) | public class DatabaseRepository {
    method DatabaseRepository (line 34) | private DatabaseRepository(Builder builder) {
    method getRepositoryName (line 42) | public String getRepositoryName() {
    method getConnectionUri (line 46) | public String getConnectionUri() {
    method getTableName (line 50) | public String getTableName() {
    method getUser (line 54) | public String getUser() {
    method getPassword (line 58) | public String getPassword() {
    method newBuilder (line 66) | public static Builder newBuilder() {
    class Builder (line 73) | public static class Builder {
      method Builder (line 84) | public Builder() {
      method withRepositoryName (line 92) | public Builder withRepositoryName(String repositoryName) {
      method withConnectionUri (line 102) | public Builder withConnectionUri(String connectionUri) {
      method withTableName (line 112) | public Builder withTableName(String tableName) {
      method withUser (line 122) | public Builder withUser(String user) {
      method withPassword (line 132) | public Builder withPassword(String password) {
      method build (line 141) | public DatabaseRepository build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/DescribeCollectionResponse.java
  class DescribeCollectionResponse (line 27) | public class DescribeCollectionResponse {
    method DescribeCollectionResponse (line 36) | public DescribeCollectionResponse(Status status, CollectionInfo collec...
    method DescribeCollectionResponse (line 45) | public DescribeCollectionResponse(Status.ErrorCode code) {
    method DescribeCollectionResponse (line 55) | public DescribeCollectionResponse(Status.ErrorCode code, String reason) {
    method getStatus (line 60) | public Status getStatus() {
    method getCollectionInfo (line 64) | public CollectionInfo getCollectionInfo() {
    method ok (line 72) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/Document.java
  class Document (line 33) | public class Document {
    method Document (line 38) | private Document(Builder builder) {
    method getPrimaryKey (line 44) | public long getPrimaryKey() {
    method getScore (line 48) | public float getScore() {
    method getForwardColumnMap (line 52) | public Map<String, ForwardValue> getForwardColumnMap() {
    method getForwardColumnCount (line 60) | public int getForwardColumnCount() {
    method getForwardKeySet (line 71) | public Set<String> getForwardKeySet() {
    method getForwardValue (line 80) | public ForwardValue getForwardValue(String key) {
    method newBuilder (line 88) | public static Builder newBuilder() {
    class ForwardValue (line 95) | public static class ForwardValue {
      method ForwardValue (line 98) | private ForwardValue(Builder builder) {
      method getFloatValue (line 103) | public float getFloatValue() {
      method getDoubleValue (line 108) | public double getDoubleValue() {
      method getInt64Value (line 113) | public long getInt64Value() {
      method getInt32Value (line 118) | public int getInt32Value() {
      method getUint64Value (line 123) | public long getUint64Value() {
      method getUint32Value (line 128) | public int getUint32Value() {
      method getBooleanValue (line 133) | public boolean getBooleanValue() {
      method getStringValue (line 141) | public String getStringValue() {
      method getBytesValue (line 169) | public byte[] getBytesValue() {
      class Builder (line 174) | public static class Builder {
        method Builder (line 177) | public Builder(GenericValue genericValue) {
        method build (line 181) | public ForwardValue build() {
    class Builder (line 190) | public static class Builder {
      method Builder (line 199) | public Builder() {
      method withPrimaryKey (line 203) | public Builder withPrimaryKey(long primaryKey) {
      method withScore (line 209) | public Builder withScore(float score) {
      method withForwardColumnMap (line 215) | public Builder withForwardColumnMap(Map<String, ForwardValue> forwar...
      method build (line 221) | public Document build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetDocumentRequest.java
  class GetDocumentRequest (line 27) | public class GetDocumentRequest {
    method GetDocumentRequest (line 32) | private GetDocumentRequest(Builder builder) {
    method getCollectionName (line 38) | public String getCollectionName() {
    method getPrimaryKey (line 42) | public long getPrimaryKey() {
    method isDebugMode (line 46) | public boolean isDebugMode() {
    method newBuilder (line 54) | public static Builder newBuilder() {
    class Builder (line 61) | public static class Builder {
      method Builder (line 72) | public Builder() {
      method Builder (line 80) | public Builder(String collectionName, long primaryKey) {
      method withCollectionName (line 90) | public Builder withCollectionName(String collectionName) {
      method withPrimaryKey (line 100) | public Builder withPrimaryKey(long primaryKey) {
      method withDebugMode (line 110) | public Builder withDebugMode(boolean debugMode) {
      method build (line 119) | public GetDocumentRequest build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetDocumentResponse.java
  class GetDocumentResponse (line 27) | public class GetDocumentResponse {
    method GetDocumentResponse (line 32) | public GetDocumentResponse(Status.ErrorCode code) {
    method GetDocumentResponse (line 38) | public GetDocumentResponse(Status.ErrorCode code, String reason) {
    method GetDocumentResponse (line 44) | public GetDocumentResponse(Status status, String debugInfo, Document d...
    method getStatus (line 50) | public Status getStatus() {
    method getDebugInfo (line 54) | public String getDebugInfo() {
    method getDocument (line 58) | public Document getDocument() {
    method ok (line 66) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/GetVersionResponse.java
  class GetVersionResponse (line 27) | public class GetVersionResponse {
    method GetVersionResponse (line 31) | public GetVersionResponse(Status.ErrorCode errorCode) {
    method GetVersionResponse (line 36) | public GetVersionResponse(Status.ErrorCode errorCode, String errorMsg) {
    method GetVersionResponse (line 41) | public GetVersionResponse(Status status, String version) {
    method getStatus (line 46) | public Status getStatus() {
    method getVersion (line 50) | public String getVersion() {
    method ok (line 58) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/IndexColumnParam.java
  class IndexColumnParam (line 30) | public class IndexColumnParam {
    method IndexColumnParam (line 37) | private IndexColumnParam(Builder builder) {
    method getColumnName (line 45) | public String getColumnName() {
    method getIndexType (line 49) | public IndexType getIndexType() {
    method getDataType (line 53) | public DataType getDataType() {
    method getDimension (line 57) | public int getDimension() {
    method getExtraParams (line 61) | public Map<String, String> getExtraParams() {
    method newBuilder (line 69) | public static Builder newBuilder() {
    class Builder (line 76) | public static class Builder {
      method Builder (line 89) | public Builder() {
      method Builder (line 98) | public Builder(String columnName, DataType dataType, int dimension) {
      method withColumnName (line 109) | public Builder withColumnName(String columnName) {
      method withDataType (line 119) | public Builder withDataType(DataType dataType) {
      method withDimension (line 131) | public Builder withDimension(int dimension) {
      method withIndexType (line 141) | public Builder withIndexType(IndexType indexType) {
      method withExtraParams (line 153) | public Builder withExtraParams(Map<String, String> extraParams) {
      method addExtraParam (line 164) | public Builder addExtraParam(String key, String value) {
      method build (line 173) | public IndexColumnParam build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/IndexType.java
  type IndexType (line 27) | public enum IndexType {
    method IndexType (line 39) | IndexType(int value) {
    method getValue (line 43) | public int getValue() {
    method valueOf (line 47) | public static IndexType valueOf(int value) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ListCollectionsResponse.java
  class ListCollectionsResponse (line 29) | public class ListCollectionsResponse {
    method ListCollectionsResponse (line 40) | public ListCollectionsResponse(Status status, List<CollectionInfo> col...
    method ListCollectionsResponse (line 49) | public ListCollectionsResponse(Status.ErrorCode code) {
    method ListCollectionsResponse (line 59) | public ListCollectionsResponse(Status.ErrorCode code, String reason) {
    method getCollectionCount (line 68) | public int getCollectionCount() {
    method getCollection (line 80) | public CollectionInfo getCollection(int index) {
    method getStatus (line 88) | public Status getStatus() {
    method ok (line 96) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ListCondition.java
  class ListCondition (line 27) | public class ListCondition {
    method ListCondition (line 30) | private ListCondition(Builder builder) {
    method getRepositoryName (line 34) | public String getRepositoryName() {
    method newBuilder (line 42) | public static Builder newBuilder() {
    class Builder (line 49) | public static class Builder {
      method Builder (line 55) | public Builder() {
      method withRepositoryName (line 63) | public Builder withRepositoryName(String repositoryName) {
      method build (line 72) | public ListCondition build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/LsnContext.java
  class LsnContext (line 27) | public class LsnContext {
    method LsnContext (line 31) | private LsnContext(Builder builder) {
    method getLsn (line 36) | public long getLsn() {
    method getContext (line 40) | public String getContext() {
    method newBuilder (line 45) | public static Builder newBuilder() {
    class Builder (line 52) | public static class Builder {
      method Builder (line 57) | public Builder() {
      method Builder (line 60) | public Builder(long lsn, String context) {
      method withLsn (line 70) | public Builder withLsn(long lsn) {
      method withContext (line 80) | public Builder withContext(String context) {
      method build (line 89) | public LsnContext build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProtoConverter.java
  class ProtoConverter (line 39) | public class ProtoConverter {
    method toPb (line 40) | public static com.alibaba.proxima.be.grpc.DataType toPb(DataType dataT...
    method toPb (line 44) | public static com.alibaba.proxima.be.grpc.IndexType toPb(IndexType ind...
    method toPb (line 48) | public static com.alibaba.proxima.be.grpc.CollectionConfig toPb(Collec...
    method toPb (line 97) | public static CollectionName toPb(String collectionName) {
    method toPb (line 103) | public static com.alibaba.proxima.be.grpc.ListCondition toPb(ListCondi...
    method toPb (line 112) | public static com.alibaba.proxima.be.grpc.WriteRequest toPb(WriteReque...
    method toPb (line 122) | public static com.alibaba.proxima.be.grpc.QueryRequest toPb(QueryReque...
    method toPb (line 132) | public static com.alibaba.proxima.be.grpc.GetDocumentRequest toPb(GetD...
    method fromPb (line 140) | public static Status fromPb(com.alibaba.proxima.be.grpc.Status status) {
    method fromPb (line 144) | public static ListCollectionsResponse fromPb(com.alibaba.proxima.be.gr...
    method fromPb (line 153) | public static DescribeCollectionResponse fromPb(com.alibaba.proxima.be...
    method fromPb (line 158) | public static StatsCollectionResponse fromPb(com.alibaba.proxima.be.gr...
    method fromPb (line 163) | public static QueryResponse fromPb(com.alibaba.proxima.be.grpc.QueryRe...
    method fromPb (line 169) | public static GetDocumentResponse fromPb(com.alibaba.proxima.be.grpc.G...
    method fromPb (line 175) | public static GetVersionResponse fromPb(com.alibaba.proxima.be.grpc.Ge...
    method toPb (line 179) | private static com.alibaba.proxima.be.grpc.QueryRequest.KnnQueryParam ...
    method toPb (line 210) | private static com.alibaba.proxima.be.grpc.WriteRequest.RowMeta toPb(W...
    method toPb (line 227) | private static List<com.alibaba.proxima.be.grpc.WriteRequest.Row> toPb...
    method fromPb (line 250) | private static List<QueryResult> fromPb(List<com.alibaba.proxima.be.gr...
    method fromPb (line 261) | private static QueryResult fromPb(com.alibaba.proxima.be.grpc.QueryRes...
    method fromPb (line 269) | private static Document fromPb(com.alibaba.proxima.be.grpc.Document pb...
    method fromPb (line 286) | private static CollectionStats fromPb(com.alibaba.proxima.be.grpc.Coll...
    method fromPb (line 300) | private static CollectionStats.SegmentStats fromPb(
    method fromPb (line 324) | private static CollectionInfo fromPb(com.alibaba.proxima.be.grpc.Colle...
    method fromPb (line 344) | private static CollectionConfig fromPb(com.alibaba.proxima.be.grpc.Col...
    method fromPb (line 362) | private static IndexColumnParam fromPb(
    method fromPb (line 380) | private static DatabaseRepository fromPb(
    method fromPb (line 391) | private static CollectionInfo.CollectionStatus fromPb(

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaGrpcSearchClient.java
  class ProximaGrpcSearchClient (line 38) | public class ProximaGrpcSearchClient implements ProximaSearchClient {
    method ProximaGrpcSearchClient (line 47) | public ProximaGrpcSearchClient(ConnectParam connectParam) {
    method close (line 63) | @Override
    method close (line 72) | @Override
    method getVersion (line 100) | @Override
    method createCollection (line 121) | @Override
    method dropCollection (line 144) | @Override
    method describeCollection (line 165) | @Override
    method listCollections (line 188) | @Override
    method statsCollection (line 210) | @Override
    method write (line 232) | @Override
    method query (line 256) | @Override
    method getDocumentByKey (line 280) | @Override
    method checkAvailable (line 299) | private boolean checkAvailable() {
    method validate (line 311) | private void validate(CollectionConfig config) throws ProximaSEExcepti...
    method validate (line 355) | private void validate(WriteRequest request) throws ProximaSEException {
    method validate (line 380) | private void validate(QueryRequest request) throws ProximaSEException {
    method validate (line 409) | private void validate(GetDocumentRequest request) throws ProximaSEExce...
    method blockingStub (line 415) | private ProximaServiceGrpc.ProximaServiceBlockingStub blockingStub() {
    method checkServerVersion (line 420) | private void checkServerVersion() throws ProximaSEException {
    method errorCode (line 444) | private Status.ErrorCode errorCode(StatusRuntimeException e) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaSEException.java
  class ProximaSEException (line 27) | public class ProximaSEException extends RuntimeException {
    method ProximaSEException (line 28) | public ProximaSEException(String message) {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/ProximaSearchClient.java
  type ProximaSearchClient (line 33) | public interface ProximaSearchClient {
    method get (line 35) | @Override
    method getClientVersion (line 58) | default String getClientVersion() {
    method getVersion (line 66) | GetVersionResponse getVersion();
    method createCollection (line 73) | Status createCollection(CollectionConfig collectionConfig);
    method dropCollection (line 80) | Status dropCollection(String collectionName);
    method describeCollection (line 87) | DescribeCollectionResponse describeCollection(String collectionName);
    method listCollections (line 94) | ListCollectionsResponse listCollections(ListCondition listCondition);
    method statsCollection (line 103) | StatsCollectionResponse statsCollection(String collectionName);
    method write (line 110) | Status write(WriteRequest request);
    method query (line 117) | QueryResponse query(QueryRequest request);
    method getDocumentByKey (line 124) | GetDocumentResponse getDocumentByKey(GetDocumentRequest request);
    method close (line 129) | void close();
    method close (line 135) | void close(int maxWaitSeconds);

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryRequest.java
  class QueryRequest (line 33) | public class QueryRequest {
    method QueryRequest (line 39) | private QueryRequest(Builder builder) {
    method getQueryType (line 46) | public QueryType getQueryType() {
    method getCollectionName (line 50) | public String getCollectionName() {
    method isDebugMode (line 54) | public boolean isDebugMode() {
    method getKnnQueryParam (line 58) | public KnnQueryParam getKnnQueryParam() {
    method newBuilder (line 66) | public static Builder newBuilder() {
    class Builder (line 73) | public static class Builder {
      method Builder (line 85) | public Builder() {
      method Builder (line 93) | public Builder(String collectionName, KnnQueryParam knnQueryParam) {
      method withQueryType (line 103) | public Builder withQueryType(QueryType queryType) {
      method withCollectionName (line 113) | public Builder withCollectionName(String collectionName) {
      method withDebugMode (line 123) | public Builder withDebugMode(boolean debugMode) {
      method withKnnQueryParam (line 133) | public Builder withKnnQueryParam(KnnQueryParam knnQueryParam) {
      method build (line 142) | public QueryRequest build() {
    class KnnQueryParam (line 150) | public static class KnnQueryParam {
      method KnnQueryParam (line 162) | private KnnQueryParam(Builder builder) {
      method getColumnName (line 175) | public String getColumnName() {
      method getTopk (line 179) | public int getTopk() {
      method getFeatures (line 183) | public byte[] getFeatures() {
      method getMatrix (line 187) | public String getMatrix() {
      method getBatchCount (line 191) | public int getBatchCount() {
      method getDimension (line 195) | public int getDimension() {
      method getDataType (line 199) | public DataType getDataType() {
      method getRadius (line 203) | public float getRadius() {
      method isLinear (line 207) | public boolean isLinear() {
      method getExtraParams (line 211) | public Map<String, String> getExtraParams() {
      method newBuilder (line 219) | public static Builder newBuilder() {
      class Builder (line 226) | public static class Builder {
        method Builder (line 244) | public Builder() {
        method Builder (line 251) | public Builder(String columnName) {
        method withColumnName (line 260) | public Builder withColumnName(String columnName) {
        method withTopk (line 270) | public Builder withTopk(int topk) {
        method withRadius (line 280) | public Builder withRadius(float radius) {
        method withLinear (line 292) | public Builder withLinear(boolean linear) {
        method withExtraParams (line 302) | public Builder withExtraParams(Map<String, String> extraParams) {
        method withFeatures (line 315) | public Builder withFeatures(byte[] features, DataType dataType, in...
        method withFeatures (line 337) | public Builder withFeatures(String jsonMatrix, DataType dataType, ...
        method withFeatures (line 355) | public Builder withFeatures(float[] features) {
        method withFeatures (line 377) | public Builder withFeatures(float[][] features) {
        method addExtraParam (line 408) | public Builder addExtraParam(String key, String value) {
        method build (line 417) | public KnnQueryParam build() {
    type QueryType (line 426) | public enum QueryType {
      method QueryType (line 434) | QueryType(int value) {
      method getValue (line 438) | public int getValue() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryResponse.java
  class QueryResponse (line 29) | public class QueryResponse {
    method QueryResponse (line 35) | public QueryResponse(Status status, long latencyMs,
    method QueryResponse (line 43) | public QueryResponse(Status.ErrorCode code) {
    method QueryResponse (line 50) | public QueryResponse(Status.ErrorCode code, String reason) {
    method getStatus (line 57) | public Status getStatus() {
    method getLatencyUs (line 61) | public long getLatencyUs() {
    method getDebugInfo (line 65) | public String getDebugInfo() {
    method getQueryResults (line 69) | public List<QueryResult> getQueryResults() {
    method getQueryResultCount (line 77) | public int getQueryResultCount() {
    method getQueryResult (line 89) | public QueryResult getQueryResult(int index) {
    method ok (line 97) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/QueryResult.java
  class QueryResult (line 30) | public class QueryResult {
    method QueryResult (line 33) | private QueryResult(Builder builder) {
    method getDocuments (line 37) | public List<Document> getDocuments() {
    method getDocumentCount (line 45) | public int getDocumentCount() {
    method getDocument (line 57) | public Document getDocument(int index) {
    method newBuilder (line 68) | public static Builder newBuilder() {
    class Builder (line 75) | public static class Builder {
      method Builder (line 81) | public Builder() {
      method withDocuments (line 89) | public Builder withDocuments(List<Document> documents) {
      method addDocument (line 99) | public Builder addDocument(Document document) {
      method build (line 108) | public QueryResult build() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/StatsCollectionResponse.java
  class StatsCollectionResponse (line 27) | public class StatsCollectionResponse {
    method StatsCollectionResponse (line 36) | public StatsCollectionResponse(Status status, CollectionStats collecti...
    method StatsCollectionResponse (line 45) | public StatsCollectionResponse(Status.ErrorCode code) {
    method StatsCollectionResponse (line 55) | public StatsCollectionResponse(Status.ErrorCode code, String reason) {
    method getStatus (line 60) | public Status getStatus() {
    method getCollectionStats (line 64) | public CollectionStats getCollectionStats() {
    method ok (line 72) | public boolean ok() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/Status.java
  class Status (line 27) | public class Status {
    method Status (line 36) | public Status(int code, String reason) {
    method Status (line 46) | public Status(ErrorCode code, String reason) {
    method Status (line 55) | public Status(ErrorCode code) {
    method getCode (line 70) | public int getCode() {
    method getReason (line 74) | public String getReason() {
    method ok (line 82) | public boolean ok() {
    method toString (line 90) | public String toString() {
    type ErrorCode (line 97) | public enum ErrorCode {
      method ErrorCode (line 121) | ErrorCode(int code) {
      method getCode (line 125) | public int getCode() {

FILE: sdk/java/src/main/java/com/alibaba/proxima/be/client/WriteRequest.java
  class WriteRequest (line 36) | public class WriteRequest {
    method WriteRequest (line 43) | private WriteRequest(Builder builder) {
    method getCollectionName (line 51) | public String getCollectionName() {
    method getRowMeta (line 55) | public RowMeta getRowMeta() {
    method getRows (line 59) | public List<Row> getRows() {
    method getRequestId (line 63) | public String getRequestId() {
    method getMagicNumber (line 67) | public long getMagicNumber() {
    method newBuilder (line 75) | public static Builder newBuilder() {
    class Builder (line 82) | public static class Builder {
      method Builder (line 95) | public Builder() {
      method withCollectionName (line 103) | public Builder withCollectionName(String collectionName) {
      method withRows (line 113) | public Builder withRows(List<Row> rows) {
      method withRequestId (line 123) | public Builder withRequestId(String requestId) {
      method withMagicNumber (line 133) | public Builder withMagicNumber(long magicNumber) {
      method withForwardColumnList (line 143) | public Builder withForwardColumnList(List<String> forwardColumnList) {
      method withIndexColumnMetaList (line 155) | public Builder withIndexColumnMetaList(List<IndexColumnMeta> indexCo...
      method addIndexColumnMeta (line 167) | public Builder addIndexColumnMeta(String columnName, DataType dataTy...
      method addForwardColumn (line 178) | public Builder addForwardColumn(String columnName) {
      method addRow (line 188) | public Builder addRow(Row row) {
      method build (line 197) | public WriteRequest build() {
    type OperationType (line 205) | public enum OperationType {
      method OperationType (line 221) | OperationType(int value) {
      method getValue (line 225) | public int getValue() {
    class Row (line 233) | public static class Row {
      method Row (line 240) | private Row(Builder builder) {
      method getPrimaryKey (line 248) | public long getPrimaryKey() {
      method getOperationType (line 252) | public OperationType getOperationType() {
      method getIndexValues (line 256) | public GenericValueList getIndexValues() {
      method getForwardValues (line 260) | public GenericValueList getForwardValues() {
      method getLsnContext (line 264) | public LsnContext getLsnContext() {
      method newBuilder (line 272) | public static Builder newBuilder() {
      class Builder (line 279) | public static class Builder {
        method Builder (line 291) | public Builder() {
        method Builder (line 299) | public Builder(long primaryKey, OperationType operationType) {
        method withPrimaryKey (line 309) | public Builder withPrimaryKey(long primaryKey) {
        method withOperationType (line 319) | public Builder withOperationType(OperationType operationType) {
        method withLsnContext (line 329) | public Builder withLsnContext(LsnContext lsnContext) {
        method addIndexValue (line 339) | public Builder addIndexValue(String indexValue) {
        method addIndexValue (line 351) | public Builder addIndexValue(byte[] indexValue) {
        method addIndexValue (line 363) | public Builder addIndexValue(float[] indexValue) {
        method addForwardValue (line 381) | public Builder addForwardValue(byte[] forwardValue) {
        method addForwardValue (line 393) | public Builder addForwardValue(String forwardValuey) {
        method addForwardValue (line 405) | public Builder addForwardValue(boolean forwardValuey) {
        method addForwardValue (line 417) | public Builder addForwardValue(int forwardValuey) {
        method addForwardValue (line 429) | public Builder addForwardValue(long forwardValuey) {
        method addForwardValue (line 441) | public Builder addForwardValue(float forwardValuey) {
        method addForwardValue (line 453) | public Builder addForwardValue(double forwardValuey) {
        method build (line 464) | public Row build() {
    class IndexColumnMeta (line 473) | public static class IndexColumnMeta {
      method IndexColumnMeta (line 478) | private IndexColumnMeta(Builder builder) {
      method getColumnName (line 484) | public String getColumnName() {
      method getDataType (line 488) | public DataType getDataType() {
      method getDimension (line 492) | public int getDimension() {
      method newBuilder (line 500) | public static Builder newBuilder() {
      class Builder (line 505) | public static class Builder {
        method Builder (line 514) | public Builder() {
        method Builder (line 523) | public Builder(String columnName, DataType dataType, int dimension) {
        method withColumnName (line 534) | public Builder withColumnName(String columnName) {
        method withDataType (line 544) | public Builder withDataType(DataType dataType) {
        method withDimension (line 554) | public Builder withDimension(int dimension) {
        method build (line 563) | public IndexColumnMeta build() {
    class RowMeta (line 572) | public static class RowMeta {
      method RowMeta (line 576) | private RowMeta(Builder builder) {
      method getIndexColumnMetas (line 581) | public List<IndexColumnMeta> getIndexColumnMetas() {
      method getForwardColumnNames (line 585) | public List<String> getForwardColumnNames() {
      method newBuilder (line 593) | public static Builder newBuilder() {
      class Builder (line 598) | public static class Builder {
        method Builder (line 608) | public Builder() {
        method withIndexColumnMetas (line 616) | public Builder withIndexColumnMetas(List<IndexColumnMeta> indexCol...
        method withForwardColumnNames (line 626) | public Builder withForwardColumnNames(List<String> forwardColumnNa...
        method addIndexColumnMeta (line 636) | public Builder addIndexColumnMeta(IndexColumnMeta indexColumnMeta) {
        method addForwardColumnName (line 646) | public Builder addForwardColumnName(String forwardColumnName) {
        method build (line 655) | public RowMeta build() {

FILE: sdk/python/example/example_async.py
  function main (line 28) | async def main():

FILE: sdk/python/pyproximabe/core/client.py
  class BaseClient (line 31) | class BaseClient(abc.ABC):
    method __init__ (line 36) | def __init__(self, handler):
    method create_collection (line 40) | def create_collection(self, collection_config):
    method describe_collection (line 52) | def describe_collection(self, collection_name):
    method drop_collection (line 66) | def drop_collection(self, collection_name):
    method stats_collection (line 78) | def stats_collection(self, collection_name):
    method list_collections (line 92) | def list_collections(self, repository_name=None):
    method query (line 108) | def query(self,
    method get_document_by_key (line 177) | def get_document_by_key(self, collection_name, primary_key):
    method write (line 194) | def write(self, write_request):
    method delete_document_by_keys (line 207) | def delete_document_by_keys(self, collection_name, primary_keys):
    method close (line 234) | def close(self):
    method _check_version (line 242) | def _check_version(self):
  class Client (line 247) | class Client(BaseClient):
    method __init__ (line 248) | def __init__(self, host, port=16000, handler='grpc', timeout=10):
  class AsyncClient (line 267) | class AsyncClient(BaseClient):
    method __init__ (line 268) | def __init__(self, host, port=16000, handler='grpc', timeout=10):

FILE: sdk/python/pyproximabe/core/handlers.py
  class BaseHandler (line 38) | class BaseHandler:
    method _parse_response (line 40) | def _parse_response(pb_or_txt,
    method _merge_client_debug_info (line 73) | def _merge_client_debug_info(rsp, timer):
    method _parse_collection_lists (line 85) | def _parse_collection_lists(status, list_response):
    method _parse_status (line 92) | def _parse_status(self, response):
  class HttpHandler (line 96) | class HttpHandler(BaseHandler):
    method __init__ (line 105) | def __init__(self, host, port, timeout):
    method create_collection (line 117) | def create_collection(self, config):
    method drop_collection (line 123) | def drop_collection(self, collection_name):
    method describe_collection (line 129) | def describe_collection(self, collection_name):
    method list_collections (line 137) | def list_collections(self, list_condition):
    method stats_collection (line 149) | def stats_collection(self, collection):
    method write (line 155) | def write(self, req):
    method query (line 160) | def query(self, req, **kwargs):
    method get_document_by_key (line 177) | def get_document_by_key(self, req):
    method get_version (line 184) | def get_version(self):
    method close (line 189) | def close(self):
    method _parse_status (line 192) | def _parse_status(self, response):
    method _send_request (line 195) | def _send_request(self, url, body=None, method='POST', **kwargs):
  class GrpcHandler (line 235) | class GrpcHandler(BaseHandler):
    method __init__ (line 236) | def __init__(self, host, port, timeout):
    method create_collection (line 246) | def create_collection(self, collection_config):
    method drop_collection (line 250) | def drop_collection(self, collection_name):
    method describe_collection (line 255) | def describe_collection(self, collection_name):
    method list_collections (line 260) | def list_collections(self, list_condition):
    method stats_collection (line 265) | def stats_collection(self, collection_name):
    method write (line 270) | def write(self, write_request):
    method query (line 274) | def query(self, query_request, **kwargs):
    method get_document_by_key (line 281) | def get_document_by_key(self, get_document_request):
    method get_version (line 285) | def get_version(self):
    method close (line 290) | def close(self):
  class AsyncGrpcHandler (line 294) | class AsyncGrpcHandler(BaseHandler):
    method __init__ (line 295) | def __init__(self, host, port, timeout):
    method create_collection (line 305) | async def create_collection(self, collection_config):
    method drop_collection (line 309) | async def drop_collection(self, collection_name):
    method describe_collection (line 314) | async def describe_collection(self, collection_name):
    method list_collections (line 319) | async def list_collections(self, list_condition):
    method stats_collection (line 324) | async def stats_collection(self, collection_name):
    method write (line 329) | async def write(self, write_request):
    method query (line 333) | async def query(self, query_request, **kwargs):
    method get_document_by_key (line 340) | async def get_document_by_key(self, get_document_request):
    method get_version (line 344) | def get_version(self):
    method close (line 362) | async def close(self):

FILE: sdk/python/pyproximabe/core/types.py
  class IndexType (line 28) | class IndexType(IntEnum):
  class DataType (line 33) | class DataType(IntEnum):
  class ProximaBeException (line 54) | class ProximaBeException(Exception):
  class ProximaBeStatus (line 58) | class ProximaBeStatus:
    method __init__ (line 67) | def __init__(self, code, reason):
    method ok (line 77) | def ok(self):
    method update_timer_report (line 84) | def update_timer_report(self, timer):
    method __str__ (line 88) | def __str__(self):
  class _Printable (line 94) | class _Printable:
    method __str__ (line 95) | def __str__(self):
    method __repr__ (line 98) | def __repr__(self):
  class IndexColumnParam (line 102) | class IndexColumnParam(_Printable):
    method __init__ (line 116) | def __init__(self,
    method to_pb (line 147) | def to_pb(self):
    method from_pb (line 160) | def from_pb(pb_column):
  class DatabaseRepository (line 170) | class DatabaseRepository(_Printable):
    method __init__ (line 183) | def __init__(self, repository_name, connection_uri, table_name, user,
    method to_pb (line 201) | def to_pb(self):
    method from_pb (line 214) | def from_pb(pb_repo):
  class CollectionConfig (line 222) | class CollectionConfig(_Printable):
    method __init__ (line 235) | def __init__(self,
    method to_pb (line 262) | def to_pb(self):
    method from_pb (line 275) | def from_pb(pb_collection_config):
  class CollectionInfo (line 292) | class CollectionInfo(_Printable):
    class Status (line 304) | class Status(IntEnum):
    method __init__ (line 311) | def __init__(self,
    method from_pb (line 336) | def from_pb(pb_collection_info):
  class WriteRequest (line 347) | class WriteRequest(_Printable):
    class IndexColumnMeta (line 348) | class IndexColumnMeta(_Printable):
      method __init__ (line 357) | def __init__(self, name, data_type, dim
Condensed preview — 682 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,763K chars).
[
  {
    "path": ".clang-format",
    "chars": 1072,
    "preview": "# http://clang.llvm.org/docs/ClangFormatStyleOptions.html\n# Defines the Google C++ style for automatic reformatting.\nBas"
  },
  {
    "path": ".git/HEAD",
    "chars": 23,
    "preview": "ref: refs/heads/master\n"
  },
  {
    "path": ".git/config",
    "chars": 352,
    "preview": "[core]\n\trepositoryformatversion = 1\n\tfilemode = true\n\tbare = false\n\tlogallrefupdates = true\n[remote \"origin\"]\n\turl = htt"
  },
  {
    "path": ".git/description",
    "chars": 73,
    "preview": "Unnamed repository; edit this file 'description' to name the repository.\n"
  },
  {
    "path": ".git/hooks/applypatch-msg.sample",
    "chars": 478,
    "preview": "#!/bin/sh\n#\n# An example hook script to check the commit log message taken by\n# applypatch from an e-mail message.\n#\n# T"
  },
  {
    "path": ".git/hooks/commit-msg.sample",
    "chars": 896,
    "preview": "#!/bin/sh\n#\n# An example hook script to check the commit log message.\n# Called by \"git commit\" with one argument, the na"
  },
  {
    "path": ".git/hooks/fsmonitor-watchman.sample",
    "chars": 4726,
    "preview": "#!/usr/bin/perl\n\nuse strict;\nuse warnings;\nuse IPC::Open2;\n\n# An example hook script to integrate Watchman\n# (https://fa"
  },
  {
    "path": ".git/hooks/post-update.sample",
    "chars": 189,
    "preview": "#!/bin/sh\n#\n# An example hook script to prepare a packed repository for use over\n# dumb transports.\n#\n# To enable this h"
  },
  {
    "path": ".git/hooks/pre-applypatch.sample",
    "chars": 424,
    "preview": "#!/bin/sh\n#\n# An example hook script to verify what is about to be committed\n# by applypatch from an e-mail message.\n#\n#"
  },
  {
    "path": ".git/hooks/pre-commit.sample",
    "chars": 1649,
    "preview": "#!/bin/sh\n#\n# An example hook script to verify what is about to be committed.\n# Called by \"git commit\" with no arguments"
  },
  {
    "path": ".git/hooks/pre-merge-commit.sample",
    "chars": 416,
    "preview": "#!/bin/sh\n#\n# An example hook script to verify what is about to be committed.\n# Called by \"git merge\" with no arguments."
  },
  {
    "path": ".git/hooks/pre-push.sample",
    "chars": 1374,
    "preview": "#!/bin/sh\n\n# An example hook script to verify what is about to be pushed.  Called by \"git\n# push\" after it has checked t"
  },
  {
    "path": ".git/hooks/pre-rebase.sample",
    "chars": 4898,
    "preview": "#!/bin/sh\n#\n# Copyright (c) 2006, 2008 Junio C Hamano\n#\n# The \"pre-rebase\" hook is run just before \"git rebase\" starts d"
  },
  {
    "path": ".git/hooks/pre-receive.sample",
    "chars": 544,
    "preview": "#!/bin/sh\n#\n# An example hook script to make use of push options.\n# The example simply echoes all push options that star"
  },
  {
    "path": ".git/hooks/prepare-commit-msg.sample",
    "chars": 1492,
    "preview": "#!/bin/sh\n#\n# An example hook script to prepare the commit log message.\n# Called by \"git commit\" with the name of the fi"
  },
  {
    "path": ".git/hooks/push-to-checkout.sample",
    "chars": 2783,
    "preview": "#!/bin/sh\n\n# An example hook script to update a checked-out tree on a git push.\n#\n# This hook is invoked by git-receive-"
  },
  {
    "path": ".git/hooks/sendemail-validate.sample",
    "chars": 2308,
    "preview": "#!/bin/sh\n\n# An example hook script to validate a patch (and/or patch series) before\n# sending it via email.\n#\n# The hoo"
  },
  {
    "path": ".git/hooks/update.sample",
    "chars": 3650,
    "preview": "#!/bin/sh\n#\n# An example hook script to block unannotated tags from entering.\n# Called by \"git receive-pack\" with argume"
  },
  {
    "path": ".git/info/exclude",
    "chars": 240,
    "preview": "# git ls-files --others --exclude-from=.git/info/exclude\n# Lines that start with '#' are comments.\n# For a project mostl"
  },
  {
    "path": ".git/logs/HEAD",
    "chars": 189,
    "preview": "0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> "
  },
  {
    "path": ".git/logs/refs/heads/master",
    "chars": 189,
    "preview": "0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> "
  },
  {
    "path": ".git/logs/refs/remotes/origin/HEAD",
    "chars": 189,
    "preview": "0000000000000000000000000000000000000000 42a1afe8b35dd3f7c66a06d6194a277c8ba13300 appuser <appuser@7c99e0e64a07.(none)> "
  },
  {
    "path": ".git/objects/pack/pack-50d7469b15937123b6a9d2f6b0fef35befd95527.promisor",
    "chars": 0,
    "preview": ""
  },
  {
    "path": ".git/objects/pack/pack-9d01884951ce3c844b4ee264b844b04baca4920c.promisor",
    "chars": 59,
    "preview": "42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/heads/master\n"
  },
  {
    "path": ".git/packed-refs",
    "chars": 114,
    "preview": "# pack-refs with: peeled fully-peeled sorted \n42a1afe8b35dd3f7c66a06d6194a277c8ba13300 refs/remotes/origin/master\n"
  },
  {
    "path": ".git/refs/heads/master",
    "chars": 41,
    "preview": "42a1afe8b35dd3f7c66a06d6194a277c8ba13300\n"
  },
  {
    "path": ".git/refs/remotes/origin/HEAD",
    "chars": 32,
    "preview": "ref: refs/remotes/origin/master\n"
  },
  {
    "path": ".git/shallow",
    "chars": 41,
    "preview": "42a1afe8b35dd3f7c66a06d6194a277c8ba13300\n"
  },
  {
    "path": ".gitignore",
    "chars": 537,
    "preview": ".*\n*~\nbazel-*\nbuild/*\nbuild\nbuild.debug\nbuild.release\nbin/*\nlib/*\nvar/*\nvenv*\ncmake-build-debug/*\ntests/integration/conf"
  },
  {
    "path": ".gitmodules",
    "chars": 1066,
    "preview": "[submodule \"deps/thirdparty/brpc/brpc\"]\n\tpath = deps/thirdparty/brpc/brpc\n\turl = https://github.com/apache/incubator-brp"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 1680,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   xiaoxin.gx"
  },
  {
    "path": "Dockerfile",
    "chars": 1453,
    "preview": "##  Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n##\n##  Licensed under the Apache License, Vers"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 2248,
    "preview": "# Proxima Bilin Engine\n\n## 背景介绍\n\n随着 AI 技术的广泛应用,以及数据规模的不断增长,对非结构化数据处理的需求也日益增多。向量检索也逐渐成了 AI 技术链路中不可或缺的一环,同时也是对传统搜索技术的补充。\n\n"
  },
  {
    "path": "benchmark/README.md",
    "chars": 12279,
    "preview": "# Proxima SE Benchmark Toolkits\nStand along toolkits for Benchmark test of ProximaSE \n## 1. Requirements\n* Python3 (Abov"
  },
  {
    "path": "benchmark/__init__.py",
    "chars": 641,
    "preview": "# Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "benchmark/common/__init__.py",
    "chars": 677,
    "preview": "# Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2"
  },
  {
    "path": "benchmark/common/exceptions.py",
    "chars": 1296,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/mysql_utils.py",
    "chars": 2369,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/proxima2_dataset.py",
    "chars": 18420,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/proxima_be_query.py",
    "chars": 3702,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/proxima_be_repo.py",
    "chars": 2026,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/proxima_be_service.py",
    "chars": 14096,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/common/runner.py",
    "chars": 3145,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/requirements.txt",
    "chars": 89,
    "preview": "grpcio==1.34.0\ngrpcio-tools==1.34.0\nprotobuf==3.14.0\n# PyMySQL~=1.0.2\n# pyproximabe~=0.1\n"
  },
  {
    "path": "benchmark/scripts/build_bench.py",
    "chars": 25338,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/scripts/query_bench.py",
    "chars": 10441,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/scripts/recall.py",
    "chars": 10389,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/scripts/vec2txt.py",
    "chars": 3981,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "benchmark/sql/create_table.sql",
    "chars": 32392,
    "preview": "########################################################################\n#  face 512 database\ncreate database vts_face_f"
  },
  {
    "path": "benchmark/tests/service_test.py",
    "chars": 1928,
    "preview": "#! /usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you "
  },
  {
    "path": "cmake/README.md",
    "chars": 6704,
    "preview": "**bazel.cmake** 是一个 bazel 风格的 CMake 模块框架,用于 C/C++/CUDA 等代码的编译和构建,支持 Ninja, GNU Make, Unix Make, Visual Studio 等构建平台。\n\n##"
  },
  {
    "path": "cmake/bazel.cmake",
    "chars": 66919,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##  Use of this source code is governed by a BSD-style\n#"
  },
  {
    "path": "cmake/option.cmake",
    "chars": 20419,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##  Use of this source code is governed by a BSD-style\n#"
  },
  {
    "path": "deps/proxima/CMakeLists.txt",
    "chars": 1619,
    "preview": "##\n##  Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n##\n##  Licensed under the Apache License, V"
  },
  {
    "path": "deps/proxima/include/ailego/algorithm/rate_limiter.h",
    "chars": 3574,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/bitmap.h",
    "chars": 13417,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/cube.h",
    "chars": 10098,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/heap.h",
    "chars": 6097,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/hypercube.h",
    "chars": 7008,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/vector.h",
    "chars": 22195,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/container/vector_array.h",
    "chars": 15786,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/debug/bug_report.h",
    "chars": 2593,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/debug/symbol_table.h",
    "chars": 2142,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/debug/user_context.h",
    "chars": 1060,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/debug/user_context_darwin.h",
    "chars": 3821,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/debug/user_context_linux.h",
    "chars": 6919,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/encoding/base64.h",
    "chars": 2425,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/encoding/json/mod_json.h",
    "chars": 42771,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/encoding/json/mod_json_plus.h",
    "chars": 87997,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/encoding/json.h",
    "chars": 910,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/encoding/uri.h",
    "chars": 2699,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/hash/crc32c.h",
    "chars": 1282,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/hash/fnv1.h",
    "chars": 6104,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/hash/jump_hash.h",
    "chars": 1349,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/internal/platform.h",
    "chars": 12644,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/io/file.h",
    "chars": 8695,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/io/file_lock.h",
    "chars": 2286,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/io/file_writer.h",
    "chars": 3134,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/io/mmap_file.h",
    "chars": 6314,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/io/pid_file.h",
    "chars": 1673,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/parallel/lock.h",
    "chars": 6121,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/parallel/semaphore.h",
    "chars": 5620,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/parallel/thread_pool.h",
    "chars": 11076,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/parallel/thread_queue.h",
    "chars": 6344,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/pattern/closure.h",
    "chars": 16590,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/pattern/defer.h",
    "chars": 1133,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/pattern/factory.h",
    "chars": 4786,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/pattern/scope_guard.h",
    "chars": 6208,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/pattern/singleton.h",
    "chars": 1708,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/string/string_concat_helper.h",
    "chars": 4234,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/string/string_view.h",
    "chars": 1979,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/bitset_helper.h",
    "chars": 5166,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/dl_helper.h",
    "chars": 1624,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/file_helper.h",
    "chars": 3164,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/float_helper.h",
    "chars": 6077,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/process_helper.h",
    "chars": 1756,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/string_helper.h",
    "chars": 11146,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/string_helper_impl.h",
    "chars": 4638,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/time_helper.h",
    "chars": 4414,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/utility/type_helper.h",
    "chars": 4653,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/version.h",
    "chars": 1105,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/ailego/version.i",
    "chars": 10282,
    "preview": "/**\n *   Copyright (C) The Software Authors. All rights reserved.\n\n *   \\file     version.i\n *   \\author   Hechong.xyf\n "
  },
  {
    "path": "deps/proxima/include/aitheta2/index_closet.h",
    "chars": 2924,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_container.h",
    "chars": 8468,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_context.h",
    "chars": 2737,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_converter.h",
    "chars": 5448,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_document.h",
    "chars": 4326,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_dumper.h",
    "chars": 4322,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_error.h",
    "chars": 5766,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_factory.h",
    "chars": 7812,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_filter.h",
    "chars": 2015,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_format.h",
    "chars": 5144,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_framework.h",
    "chars": 1560,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_helper.h",
    "chars": 2761,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_holder.h",
    "chars": 18847,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_logger.h",
    "chars": 4878,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_measure.h",
    "chars": 2931,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_meta.h",
    "chars": 19809,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_module.h",
    "chars": 1764,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_packer.h",
    "chars": 6832,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_params.h",
    "chars": 27894,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_plugin.h",
    "chars": 2922,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_provider.h",
    "chars": 1968,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_reformer.h",
    "chars": 2519,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_searcher.h",
    "chars": 10755,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_stats.h",
    "chars": 1938,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_storage.h",
    "chars": 3144,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_streamer.h",
    "chars": 18663,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_threads.h",
    "chars": 5025,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_unpacker.h",
    "chars": 9384,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/proxima/include/aitheta2/index_version.h",
    "chars": 1138,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "deps/thirdparty/.gitignore",
    "chars": 62,
    "preview": ".*\n*~\nbazel-*\nbuild/*\nbin/*\nlib/*\nvar/*\n!.git*\n!.clang-format\n"
  },
  {
    "path": "deps/thirdparty/CMakeLists.txt",
    "chars": 1479,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/brpc/CMakeLists.txt",
    "chars": 1616,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/gflags/CMakeLists.txt",
    "chars": 2062,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/glog/CMakeLists.txt",
    "chars": 1018,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/googletest/CMakeLists.txt",
    "chars": 635,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/leveldb/CMakeLists.txt",
    "chars": 972,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/mysql/CMakeLists.txt",
    "chars": 2791,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/ncurses/CMakeLists.txt",
    "chars": 1635,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/openssl/CMakeLists.txt",
    "chars": 2129,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/patches/brpc.patch",
    "chars": 1493,
    "preview": "diff --git a/CMakeLists.txt b/CMakeLists.txt\nindex 3deb7342..2937c8d6 100644\n--- a/brpc/brpc/CMakeLists.txt\n+++ b/brpc/b"
  },
  {
    "path": "deps/thirdparty/protobuf/CMakeLists.txt",
    "chars": 1910,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/snappy/CMakeLists.txt",
    "chars": 400,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/sparsehash/CMakeLists.txt",
    "chars": 367,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "deps/thirdparty/sqlite/CMakeLists.txt",
    "chars": 791,
    "preview": "##\n##  Copyright (C) The Software Authors. All rights reserved.\n##\n##  \\file     CMakeLists.txt\n##  \\author   Hechong.xy"
  },
  {
    "path": "scripts/README.md",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "scripts/conf/proxima_be.conf",
    "chars": 112,
    "preview": "common_config {\n  grpc_listen_port: 16000\n  http_listen_port: 16001\n}\n\nquery_config {\n  query_thread_count: 8\n}\n"
  },
  {
    "path": "scripts/conf/proxima_se.conf",
    "chars": 306,
    "preview": "common_config {\n    log_directory: \"/var/lib/proxima-se/log/\"\n    metrics_config {\n\t    name: \"bvar\"\n\t}\n\tgrpc_listen_por"
  },
  {
    "path": "scripts/gcc4.9-build.sh",
    "chars": 318,
    "preview": "#!/bin/bash\n\ntype=$1\narch=$2\n\neval $(ssh-agent -s)\nchmod 600 .gitrsa && ssh-add .gitrsa\n\nworkdir=build/gcc4.9-$arch\nmkdi"
  },
  {
    "path": "scripts/gcc4.9-unittest.sh",
    "chars": 153,
    "preview": "#!/bin/bash\n\narch=$1\nworkdir=build/gcc4.9-$arch\n\ncd $workdir || exit 1\nenv ASAN_OPTIONS=detect_leaks=1 cmake --build . -"
  },
  {
    "path": "scripts/gcc8.3-build.sh",
    "chars": 550,
    "preview": "#!/bin/bash\n\nexport PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH\nexport LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib6"
  },
  {
    "path": "scripts/gcc8.3-integration.sh",
    "chars": 370,
    "preview": "#!/bin/bash\n\nexport PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH\nexport LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib6"
  },
  {
    "path": "scripts/gcc8.3-unittest.sh",
    "chars": 367,
    "preview": "#!/bin/bash\n\nexport PATH=/usr/local/gcc-8.3.0/bin:/opt/cmake/bin/:$PATH\nexport LD_LIBRARY_PATH=/usr/local/gcc-8.3.0/lib6"
  },
  {
    "path": "scripts/gcov.sh",
    "chars": 861,
    "preview": "#!/bin/bash\n\nproject_name=proxima-be\ngcov_tool=gcov\nzip_html=false\noutput_name=html\n\nscript_dir=$(cd \"$(dirname \"$0\")\"; "
  },
  {
    "path": "scripts/hooks/clang-format.sh",
    "chars": 674,
    "preview": "#!/bin/bash\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n. $DIR/common.sh\n\nignore_merge\n\nchec"
  },
  {
    "path": "scripts/hooks/common.sh",
    "chars": 518,
    "preview": "#!/bin/bash\ncheck_clang_version() {\n\tif ! hash clang-format 2> /dev/null; then\n\t\techo 'clang-format not installed'\n\t\tech"
  },
  {
    "path": "scripts/hooks/post-commit",
    "chars": 132,
    "preview": "#!/bin/bash\nif ! [ -f .commit ]; then\n\t# not trigerred by user commit, exit\n\texit\nfi\nrm -f .commit\n\n./scripts/hooks/clan"
  },
  {
    "path": "scripts/hooks/pre-commit",
    "chars": 68,
    "preview": "#!/bin/bash\n# create a tag file to notify post-commit\ntouch .commit\n"
  },
  {
    "path": "scripts/install-git-hooks.sh",
    "chars": 132,
    "preview": "#!/bin/bash\nif [ -d .git/hooks ]; then\n\tfor f in pre-commit post-commit\n\tdo\n\t\tln -snf ../../scripts/hooks/$f .git/hooks/"
  },
  {
    "path": "sdk/CMakeLists.txt",
    "chars": 793,
    "preview": "##\n##  Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n##\n##  Licensed under the Apache License, V"
  },
  {
    "path": "sdk/cpp/CMakeLists.txt",
    "chars": 1798,
    "preview": "##\n##  Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n##\n##  Licensed under the Apache License, V"
  },
  {
    "path": "sdk/cpp/README.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "sdk/cpp/examples/client_example.cc",
    "chars": 7531,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/cpp/include/proxima_search_client.h",
    "chars": 22756,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/cpp/src/grpc_client.cc",
    "chars": 21217,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/cpp/src/grpc_client.h",
    "chars": 21247,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/cpp/src/http_client.cc",
    "chars": 8798,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/cpp/src/http_client.h",
    "chars": 2908,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/cpp/src/proxima_search_client.cc",
    "chars": 1070,
    "preview": "#include \"grpc_client.h\"\n#include \"http_client.h\"\n\nnamespace proxima {\nnamespace be {\n\nProximaSearchClientPtr ProximaSea"
  },
  {
    "path": "sdk/cpp/src/version.h",
    "chars": 1158,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/go/.gitignore",
    "chars": 92,
    "preview": ".*\n*~\nbazel-*\nbuild/*\nbin/*\nlib/*\nvar/*\ndeps/*\n!.git*\n!.clang-format\n!.circleci\n!.drone.yml\n"
  },
  {
    "path": "sdk/go/README.md",
    "chars": 1151,
    "preview": "\n## Quickstart\n\n```go\nfunc ExampleNewClient() {\n\tprotoc := be.GrpcProtocol\n\tif *Http {\n\t\tprotoc = be.HttpProtocol\n\t}\n\tcl"
  },
  {
    "path": "sdk/go/client_proxy.go",
    "chars": 5282,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/clients.go",
    "chars": 9264,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/const.go",
    "chars": 4416,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/doc.go",
    "chars": 788,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/examples/demo/README.md",
    "chars": 178,
    "preview": "### SDK Example \nDemo for collections and document management\n\n#### To Run without arguments:\n- `go run .`\n\n#### To Run "
  },
  {
    "path": "sdk/go/examples/demo/example.go",
    "chars": 8165,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/examples/demo/go.mod",
    "chars": 182,
    "preview": "module github.com/alibaba/proximabilin/sdk/go/example/demo\n\ngo 1.16\n\nrequire github.com/alibaba/proximabilin/sdk/go v0.1"
  },
  {
    "path": "sdk/go/examples/demo/go.sum",
    "chars": 9184,
    "preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ngithub.com/BurntSushi/toml v0.3.1/go."
  },
  {
    "path": "sdk/go/go.mod",
    "chars": 435,
    "preview": "module github.com/alibaba/proximabilin/sdk/go\n\ngo 1.16\n\n\nrequire (\n\tgithub.com/boljen/go-bitmap v0.0.0-20151001105940-23"
  },
  {
    "path": "sdk/go/go.sum",
    "chars": 11822,
    "preview": "cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=\ncloud.google.com/go v0.26.0/go.mod h1:aQUYkX"
  },
  {
    "path": "sdk/go/interfaces.go",
    "chars": 3809,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/options.go",
    "chars": 3554,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/proto/common.pb.go",
    "chars": 41003,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/proto/config.pb.go",
    "chars": 22641,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/proto/proxima_be.pb.go",
    "chars": 153385,
    "preview": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// versions:\n// \tprotoc-gen-go v1.25.0\n// \tprotoc        v3.14.0\n// sou"
  },
  {
    "path": "sdk/go/status.go",
    "chars": 1814,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/types.go",
    "chars": 9181,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/utils.go",
    "chars": 17424,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/utils_test.go",
    "chars": 5777,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n *   Licensed under the Apache Licens"
  },
  {
    "path": "sdk/go/version.go",
    "chars": 811,
    "preview": "/**\n *   Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n *   Licensed under the Apache License"
  },
  {
    "path": "sdk/java/README.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "sdk/java/example/pom.xml",
    "chars": 2364,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www"
  },
  {
    "path": "sdk/java/example/src/main/java/com/alibaba/example/BenchClient.java",
    "chars": 20766,
    "preview": "/**\n * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n * \n * Licensed under the Apache License, V"
  },
  {
    "path": "sdk/java/example/src/main/java/com/alibaba/example/TestExample.java",
    "chars": 10981,
    "preview": "/**\n * Copyright 2021 Alibaba, Inc. and its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Ve"
  },
  {
    "path": "sdk/java/example/src/main/resources/log4j2.xml",
    "chars": 400,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Configuration status=\"INFO\">\n    <Appenders>\n        <Console name=\"Console\" tar"
  },
  {
    "path": "sdk/java/pom.xml",
    "chars": 4223,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www"
  }
]

// ... and 482 more files (download for full content)

About this extraction

This page contains the full source code of the alibaba/proximabilin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 682 files (29.6 MB), approximately 1.4M tokens, and a symbol index with 4068 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!