Skip to content

Commit

Permalink
Merge pull request #712 from orb-community/revert-710-revert-707-develop
Browse files Browse the repository at this point in the history
Revert "Revert "Release 4.5.0""
  • Loading branch information
mfiedorowicz authored Jan 5, 2024
2 parents c3e2ccb + ff849b8 commit 8e7c8b6
Show file tree
Hide file tree
Showing 174 changed files with 2,642 additions and 3,208 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /pktvisor-src
RUN apt-get update && \
apt-get upgrade --yes --force-yes && \
apt-get install --yes --force-yes --no-install-recommends ${BUILD_DEPS} && \
pip3 install 'conan==1.59.0' --force-reinstall
pip3 install 'conan==1.61.0' --force-reinstall

RUN chmod +x /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest
FROM golang:bullseye

LABEL author="Everton Haise Taques <[email protected]>"
LABEL maintainer="netboxlabs"
Expand Down
87 changes: 45 additions & 42 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,56 +24,58 @@ jobs:
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

runs-on: macos-11
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install gcc 12.2
run: |
gcc --version
brew search gcc
brew install gcc@12
gcc --version

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Get Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

# - name: Setup Conan Cache
# uses: actions/cache@v3
# with:
# path: ${{github.workspace}}/build/conan_home/
# key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt', '*/conanfile.txt') }}
# restore-keys: conan-${{ runner.os }}-

# - name: Configure CMake
# # Use a bash shell so we can use the same syntax for environment variable
# # access regardless of the host operating system
# shell: bash
# working-directory: ${{github.workspace}}/build
# # Note the current convention is to use the -S and -B options here to specify source
# # and build directories, but this is only available with CMake 3.13 and higher.
# # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

# - name: Build
# working-directory: ${{github.workspace}}/build
# shell: bash
# # Execute the build. You can specify a specific target with "--target <NAME>"
# run: cmake --build . --config $BUILD_TYPE -- -j 2

# - name: Test
# working-directory: ${{github.workspace}}/build
# shell: bash
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE
version: 1.61.0

- name: Setup OSX Environment
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV

- name: Setup Conan Cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/build/conan_home/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt', '*/conanfile.txt') }}
restore-keys: conan-${{ runner.os }}-

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE -- -j 2

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE

unit-tests-linux:
# The CMake configure and build commands are platform agnostic and should work equally
Expand All @@ -99,7 +101,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: linux package install
run: |
Expand Down Expand Up @@ -166,7 +168,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Remove libpcap from conanfile
shell: bash
Expand Down Expand Up @@ -396,7 +398,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -848,6 +850,7 @@ jobs:
with:
context: "."
file: "./Dockerfile"
goarch: "arm64"

- name: Debug artifacts
run: ls -lha .
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Setup Conan Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Remove libpcap from conanfile
shell: bash
Expand Down Expand Up @@ -423,6 +423,7 @@ jobs:
uses: ./.github/actions/build-go
with:
context: "."
goarch: arm64
file: "./Dockerfile"

- name: Debug artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
curl -L "${{matrix.toolchain}}" | tar -C toolchain -xz --strip-components=1
- name: Install Conan
run: pip install --no-cache-dir 'conan==1.59.0' --force-reinstall
run: pip install --no-cache-dir 'conan==1.61.0' --force-reinstall

- name: Create Conan configuration
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Setup Conan Cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- run: |
# Run Build - set up dependencies, env vars, compile, and make test
#install conan
pip install --no-cache-dir 'conan==1.59.0' --force-reinstall
pip install --no-cache-dir 'conan==1.61.0' --force-reinstall
# create conan config
CONAN_V2_MODE=1 conan config init
conan config set general.revisions_enabled=1
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ docs/internals/html
appimage/*.AppImage
/test-config*.yaml
localconfig/
.cache/
.vscode/
build/
7 changes: 6 additions & 1 deletion 3rd/datasketches/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ target_sources(common
${CMAKE_CURRENT_SOURCE_DIR}/include/conditional_back_inserter.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/conditional_forward.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ceiling_power_of_2.hpp
)
${CMAKE_CURRENT_SOURCE_DIR}/include/kolmogorov_smirnov.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/kolmogorov_smirnov_impl.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/quantiles_sorted_view.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/quantiles_sorted_view_impl.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/version.hpp.in
)
52 changes: 25 additions & 27 deletions 3rd/datasketches/common/include/MurmurHash3.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,30 @@ typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;

#define FORCE_INLINE __forceinline
#define MURMUR3_FORCE_INLINE __forceinline

#include <stdlib.h>

#define ROTL32(x,y) _rotl(x,y)
#define ROTL64(x,y) _rotl64(x,y)
#define MURMUR3_ROTL64(x,y) _rotl64(x,y)

#define BIG_CONSTANT(x) (x)
#define MURMUR3_BIG_CONSTANT(x) (x)

// Other compilers

#else // defined(_MSC_VER)

#include <stdint.h>

#define FORCE_INLINE inline __attribute__((always_inline))

inline uint32_t rotl32 ( uint32_t x, int8_t r )
{
return (x << r) | (x >> (32 - r));
}
#define MURMUR3_FORCE_INLINE inline __attribute__((always_inline))

inline uint64_t rotl64 ( uint64_t x, int8_t r )
{
return (x << r) | (x >> (64 - r));
}

#define ROTL32(x,y) rotl32(x,y)
#define ROTL64(x,y) rotl64(x,y)
#define MURMUR3_ROTL64(x,y) rotl64(x,y)

#define BIG_CONSTANT(x) (x##LLU)
#define MURMUR3_BIG_CONSTANT(x) (x##LLU)

#endif // !defined(_MSC_VER)

Expand All @@ -78,7 +71,7 @@ typedef struct {
// Block read - if your platform needs to do endian-swapping or can only
// handle aligned reads, do the conversion here

FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
MURMUR3_FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
{
uint64_t res;
memcpy(&res, p + i, sizeof(res));
Expand All @@ -88,20 +81,21 @@ FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
//-----------------------------------------------------------------------------
// Finalization mix - force all bits of a hash block to avalanche

FORCE_INLINE uint64_t fmix64 ( uint64_t k )
MURMUR3_FORCE_INLINE uint64_t fmix64 ( uint64_t k )
{
k ^= k >> 33;
k *= BIG_CONSTANT(0xff51afd7ed558ccd);
k *= MURMUR3_BIG_CONSTANT(0xff51afd7ed558ccd);
k ^= k >> 33;
k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53);
k *= MURMUR3_BIG_CONSTANT(0xc4ceb9fe1a85ec53);
k ^= k >> 33;

return k;
}

FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t seed, HashState& out) {
static const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
static const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
MURMUR3_FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes,
uint64_t seed, HashState& out) {
static const uint64_t c1 = MURMUR3_BIG_CONSTANT(0x87c37b91114253d5);
static const uint64_t c2 = MURMUR3_BIG_CONSTANT(0x4cf5ad432745937f);

const uint8_t* data = (const uint8_t*)key;

Expand All @@ -118,13 +112,13 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
uint64_t k1 = getblock64(blocks, i * 2 + 0);
uint64_t k2 = getblock64(blocks, i * 2 + 1);

k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
out.h1 = ROTL64(out.h1,27);
k1 *= c1; k1 = MURMUR3_ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
out.h1 = MURMUR3_ROTL64(out.h1,27);
out.h1 += out.h2;
out.h1 = out.h1*5+0x52dce729;

k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
out.h2 = ROTL64(out.h2,31);
k2 *= c2; k2 = MURMUR3_ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
out.h2 = MURMUR3_ROTL64(out.h2,31);
out.h2 += out.h1;
out.h2 = out.h2*5+0x38495ab5;
}
Expand All @@ -144,7 +138,7 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
case 11: k2 ^= ((uint64_t)tail[10]) << 16; // falls through
case 10: k2 ^= ((uint64_t)tail[ 9]) << 8; // falls through
case 9: k2 ^= ((uint64_t)tail[ 8]) << 0;
k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
k2 *= c2; k2 = MURMUR3_ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
// falls through
case 8: k1 ^= ((uint64_t)tail[ 7]) << 56; // falls through
case 7: k1 ^= ((uint64_t)tail[ 6]) << 48; // falls through
Expand All @@ -154,7 +148,7 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
case 3: k1 ^= ((uint64_t)tail[ 2]) << 16; // falls through
case 2: k1 ^= ((uint64_t)tail[ 1]) << 8; // falls through
case 1: k1 ^= ((uint64_t)tail[ 0]) << 0;
k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
k1 *= c1; k1 = MURMUR3_ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
};

//----------
Expand All @@ -175,10 +169,14 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t

//-----------------------------------------------------------------------------

FORCE_INLINE uint16_t compute_seed_hash(uint64_t seed) {
MURMUR3_FORCE_INLINE uint16_t compute_seed_hash(uint64_t seed) {
HashState hashes;
MurmurHash3_x64_128(&seed, sizeof(seed), 0, hashes);
return static_cast<uint16_t>(hashes.h1 & 0xffff);
}

#undef MURMUR3_FORCE_INLINE
#undef MURMUR3_ROTL64
#undef MURMUR3_BIG_CONSTANT

#endif // _MURMURHASH3_H_
1 change: 1 addition & 0 deletions 3rd/datasketches/common/include/binomial_bounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <algorithm>
#include <cmath>
#include <stdexcept>

/*
* This class enables the estimation of error bounds given a sample set size, the sampling
Expand Down
Loading

0 comments on commit 8e7c8b6

Please sign in to comment.