Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parser branch--for Enhancing parsing speed #537

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
# AlignConsecutiveBitFields: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, please do not change the clang format.

AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
Expand All @@ -39,8 +39,8 @@ BraceWrapping:
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
# BeforeLambdaBody: false
# BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
Expand Down Expand Up @@ -87,13 +87,13 @@ IncludeCategories:
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentCaseBlocks: true
# IndentCaseBlocks: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
# IndentExternBlock: AfterExternBlock
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
# InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
Expand All @@ -103,7 +103,7 @@ MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
# ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
Expand Down Expand Up @@ -174,9 +174,9 @@ StatementMacros:
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
# WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE
...

16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ project(TuGraph C CXX)

message("Community version.")

# options
#options
include(Options.cmake)

# env
#env
set(LGRAPH_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
set(DEPS_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/deps/install/include)
set(DEPS_LIBRARY_DIR ${CMAKE_CURRENT_LIST_DIR}/deps/install/lib)
Expand All @@ -24,27 +24,27 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
link_directories(${DEPS_LOCAL_LIBRARY_DIR})
endif ()

# output
#output
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)

# third-party
#third - party
if(NOT DEFINED TUGRAPH_THIRD_PARTY_DIR)
set(TUGRAPH_THIRD_PARTY_DIR "/usr/local;/usr")
endif()
if (NOT DEFINED GEAX_THIRD_PARTY_DIR)
set(GEAX_THIRD_PARTY_DIR ${TUGRAPH_THIRD_PARTY_DIR})
endif()

# modules
#modules
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(OpenSSL REQUIRED)
# boost
#boost
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.68 REQUIRED COMPONENTS log system filesystem)

# target
#target
set(GEAX_ENABLE_GLOG OFF)
add_subdirectory(deps/geax-front-end)
add_subdirectory(src)
Expand All @@ -55,7 +55,7 @@ if (BUILD_PROCEDURE)
add_subdirectory(procedures)
endif (BUILD_PROCEDURE)

# unit_test
#unit_test
if (WITH_TESTS)
add_subdirectory(test)
endif (WITH_TESTS)
7 changes: 3 additions & 4 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set noparent
linelength=100
filter=-build/include_what_you_use,-build/namespaces,-build/c++11,-build/c++14,-runtime/references,-readability/casting
exclude_files=benchmark/*
set noparent linelength = 100 filter = -build / include_what_you_use, -build / namespaces,
-build / c++ 11, -build / c++ 14, -runtime / references,
-readability / casting exclude_files = benchmark/*
exclude_files=demo/*
32 changes: 16 additions & 16 deletions Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(LGRAPH_VERSION_MAJOR 4)
set(LGRAPH_VERSION_MINOR 3)
set(LGRAPH_VERSION_PATCH 0)

# options
#options
option(ENABLE_WALL "Enable all compiler's warning messages." ON)
if (ENABLE_WALL)
message("Wall is enabled.")
Expand Down Expand Up @@ -88,13 +88,13 @@ if (WITH_TESTS)
message("Build with tests.")
endif (WITH_TESTS)

# disable krb5
#disable krb5
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENSSL_NO_KRB5=1")

# remove prefix in macro __FILE__
#remove prefix in macro __FILE__
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmacro-prefix-map=${CMAKE_CURRENT_LIST_DIR}/=")

# Detect build type, fallback to release and throw a warning if use didn't specify any
#Detect build type, fallback to release and throw a warning if use didn't specify any
if (NOT CMAKE_BUILD_TYPE)
message(WARNING "Build type not set, falling back to RelWithDebInfo mode.
To specify build type use:
Expand All @@ -105,17 +105,17 @@ if (NOT CMAKE_BUILD_TYPE)
endif (NOT CMAKE_BUILD_TYPE)
message("CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")

# coverage flags
#coverage flags
SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -O3")
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS} -lgcov -O3")
MARK_AS_ADVANCED(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE)

# support PRId64
#support PRId64
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS")

# make sure cmake prefers static lib
#make sure cmake prefers static lib
IF (WIN32)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ELSE (WIN32)
Expand All @@ -125,15 +125,15 @@ ENDIF (WIN32)
## ---------------------------
## check compiler options
## ---------------------------
# check compiler version
#check compiler version
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# require at least gcc 4.8
#require at least gcc 4.8
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "GCC is too old, requires GCC 5.0 or above.")
endif ()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# CMAKE_CXX_COMPILER_ID might be AppleClang, use "MATCHES" instead of "STREQUAL"
# require at least clang 3.3
#CMAKE_CXX_COMPILER_ID might be AppleClang, use "MATCHES" instead of "STREQUAL"
#require at least clang 3.3
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "Clang is too old, requires Clang 3.3 or above.")
endif ()
Expand All @@ -142,11 +142,11 @@ else ()
message(WARNING "You are using an unsupported compiler! Compilation has only been tested with Clang and GCC.")
endif ()

# check OpenMP
#check OpenMP
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")

# compiling rocksdb needs c++17
# check c++17
#compiling rocksdb needs c++ 17
#check c++ 17
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
if (COMPILER_SUPPORTS_CXX17)
Expand All @@ -157,8 +157,8 @@ endif ()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# GNU: static link libstdc++ and libgcc
# Clang: static link libc++
#GNU : static link libstdc++and libgcc
#Clang : static link libc++
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
CHECK_CXX_COMPILER_FLAG("-static-libstdc++ -static-libgcc" COMPILER_SUPPORTS_STATIC_GCC)
if (COMPILER_SUPPORTS_STATIC_GCC)
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TuGraph
#TuGraph

[![Release](https://shields.io/github/v/release/tugraph-family/tugraph-db.svg?logo=stackblitz&label=Version&color=red)](https://github.com/TuGraph-family/tugraph-db/releases)
[![UT&&IT](https://github.com/TuGraph-family/tugraph-db/actions/workflows/ci.yml/badge.svg)](https://github.com/TuGraph-family/tugraph-db/actions/workflows/ci.yml)
Expand Down Expand Up @@ -106,6 +106,3 @@ Slack (For developer quick communication):

Contact us via dingtalk, wechat, email and telephone:
![contacts](./docs/images/contact-en.png)



3 changes: 1 addition & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TuGraph
#TuGraph

[![Release](https://shields.io/github/v/release/tugraph-family/tugraph-db.svg?logo=stackblitz&label=Version&color=red)](https://github.com/TuGraph-family/tugraph-db/releases)
[![UT&&IT](https://github.com/TuGraph-family/tugraph-db/actions/workflows/ci.yml/badge.svg)](https://github.com/TuGraph-family/tugraph-db/actions/workflows/ci.yml)
Expand Down Expand Up @@ -104,4 +104,3 @@ Slack (在线开发沟通):

通过钉钉群、微信群、微信公众号、邮箱和电话联系我们:
![contacts](./docs/images/contact-zh.png)

34 changes: 9 additions & 25 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
codecov:
notify:
require_ci_to_pass: yes
codecov : notify : require_ci_to_pass : yes

coverage:
precision: 2
round: down
range: "60...100"
coverage : precision : 2 round : down range : "60...100"

status:
project: no
patch: no
changes: no
status
: project : no patch : no changes : no

github_checks: false
github_checks : false

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no


comment:
layout: "header, diff"
behavior: default
require_changes: no
parsers : gcov : branch_detection
: conditional : yes loop : yes method : no macro : no

comment : layout
: "header, diff" behavior : default require_changes : no
Loading
Loading