Changes for benchmarking on AWS.

Added files missing file to copy in barier.sh.
Updated barrier.
This commit is contained in:
Kruno Tomola Fabro 2016-09-16 20:33:30 +01:00
parent ed919b615a
commit 8fd713d93d
8 changed files with 94 additions and 31 deletions

View File

@ -59,6 +59,8 @@ class EdgePropertyFamily;
// ************* Here should be defined usings
using label_ref_t = ReferenceWrapper<const Label>;
using VertexStoredProperty = PropertyHolder<VertexPropertyKey>;
using EdgeStoredProperty = PropertyHolder<EdgePropertyKey>;
// ************ Here should be definitions of Sized barrier classes
// Original class should have Sized barrier class if it can't be Unsized.
@ -147,9 +149,9 @@ public:
void remove() const;
const StoredProperty<TypeGroupVertex> &at(VertexPropertyFamily &key) const;
const VertexStoredProperty &at(VertexPropertyFamily &key) const;
const StoredProperty<TypeGroupVertex> &at(VertexPropertyKey &key) const;
const VertexStoredProperty &at(VertexPropertyKey &key) const;
template <class V>
OptionPtr<const V> at(VertexPropertyType<V> &key) const;
@ -203,9 +205,9 @@ public:
void remove() const;
const StoredProperty<TypeGroupEdge> &at(EdgePropertyFamily &key) const;
const EdgeStoredProperty &at(EdgePropertyFamily &key) const;
const StoredProperty<TypeGroupEdge> &at(EdgePropertyKey &key) const;
const EdgeStoredProperty &at(EdgePropertyKey &key) const;
template <class V>
OptionPtr<const V> at(EdgePropertyType<V> &key) const;
@ -406,6 +408,8 @@ public:
VertexPropertyKey &operator=(const VertexPropertyKey &other) = default;
VertexPropertyKey &operator=(VertexPropertyKey &&other) = default;
Type get_type() const;
};
class EdgePropertyKey : private Sized<8, 8>
@ -420,6 +424,8 @@ public:
EdgePropertyKey &operator=(const EdgePropertyKey &other) = default;
EdgePropertyKey &operator=(EdgePropertyKey &&other) = default;
Type get_type() const;
};
template <class K>
@ -468,8 +474,8 @@ public:
void write(const VertexAccessor &vertex);
void write(const EdgeAccessor &edge);
void write(const StoredProperty<TypeGroupVertex> &prop);
void write(const StoredProperty<TypeGroupEdge> &prop);
void write(const VertexStoredProperty &prop);
void write(const EdgeStoredProperty &prop);
void write_null();
void write(const Null &v);
void write(const Bool &prop);

View File

@ -1,10 +1,10 @@
#pragma once
#include <cassert>
#include <map>
#include <type_traits>
#include <utility>
#include <vector>
#include <map>
// THis shoul be the only place to include code from memgraph other than
// barrier.cpp
@ -12,7 +12,6 @@
#include "storage/indexes/index_definition.hpp"
#include "storage/model/properties/all.hpp"
#include "storage/model/properties/property.hpp"
#include "storage/model/properties/stored_property.hpp"
#include "utils/border.hpp"
#include "utils/iterator/iterator.hpp"
#include "utils/option_ptr.hpp"

View File

@ -175,6 +175,8 @@ TRANSFORM_REF(VertexPropertyKey,
::VertexPropertyFamily::PropertyType::PropertyFamilyKey);
TRANSFORM_REF(EdgePropertyKey,
::EdgePropertyFamily::PropertyType::PropertyFamilyKey);
TRANSFORM_REF(VertexStoredProperty, ::StoredProperty<TypeGroupVertex>);
TRANSFORM_REF(EdgeStoredProperty, ::StoredProperty<TypeGroupEdge>);
// ITERATORS
TRANSFORM_REF(VertexIterator, ::iter::Virtual<const ::VertexAccessor>);

View File

@ -9,8 +9,9 @@ template <class Derived>
class Server : public EventListener<Derived>
{
public:
Server(Socket &&socket) : socket(std::forward<Socket>(socket)),
logger(logging::log->logger("io::Server"))
Server(Socket &&socket)
: socket(std::forward<Socket>(socket)),
logger(logging::log->logger("io::Server"))
{
event.data.fd = this->socket;

View File

@ -20,7 +20,8 @@ public:
{
// If size is bigger than pages_size then this do-whil will never end
// until it eats all the memory.
static_assert(sizeof(T) <= page_size);
static_assert(sizeof(T) <= page_size,
"Cant allocate objects larger than page_size");
do {
// Mask which has log2(alignof(T)) lower bits setted to 0 and the
// rest to 1.

View File

@ -7,7 +7,7 @@ RUN apt-get update \
RUN mkdir -p /libs
RUN mkdir -p /memgraph
ENV BINARY_NAME memgraph_393_7eff53e_demo_debug
ENV BINARY_NAME memgraph_394_4616f32_demo_release
COPY barrier_$BINARY_NAME /memgraph
COPY libs/fmt /libs/fmt

View File

@ -16,13 +16,15 @@ mkdir -p $release_path/include/cypher
mkdir -p $release_path/include/io/network
mkdir -p $release_path/include/logging
mkdir -p $release_path/include/mvcc
mkdir -p $release_path/include/query_engine
mkdir -p $release_path/include/query_engine/exceptions
mkdir -p $release_path/include/storage/indexes
mkdir -p $release_path/include/storage/model/properties/traversers
mkdir -p $release_path/include/storage/model/properties/utils
mkdir -p $release_path/include/utils/datetime
mkdir -p $release_path/include/utils/exceptions
mkdir -p $release_path/include/utils/iterator
mkdir -p $release_path/include/utils/memory
mkdir -p $release_path/include/utils/numerics
mkdir -p $release_path/template
@ -37,7 +39,7 @@ done
cp src/query_engine/$compile_template_path $release_path/$compile_template_path
paths="barrier/barrier.hpp barrier/common.hpp storage/model/properties/floating.hpp storage/model/properties/all.hpp storage/model/properties/bool.hpp storage/model/properties/traversers/consolewriter.hpp storage/model/properties/traversers/jsonwriter.hpp storage/model/properties/array.hpp storage/model/properties/property_family.hpp storage/model/properties/property.hpp storage/model/properties/properties.hpp storage/model/properties/integral.hpp storage/model/properties/double.hpp storage/model/properties/string.hpp storage/model/properties/utils/math_operations.hpp storage/model/properties/utils/unary_negation.hpp storage/model/properties/utils/modulo.hpp storage/model/properties/float.hpp storage/model/properties/null.hpp storage/model/properties/flags.hpp storage/model/properties/int32.hpp storage/model/properties/number.hpp storage/model/properties/int64.hpp logging/default.hpp logging/log.hpp logging/logger.hpp logging/levels.hpp io/network/addrinfo.hpp io/network/network_error.hpp io/network/socket.hpp mvcc/id.hpp utils/exceptions/basic_exception.hpp utils/border.hpp utils/total_ordering.hpp utils/auto_scope.hpp utils/crtp.hpp utils/order.hpp utils/likely.hpp utils/option.hpp utils/option_ptr.hpp utils/memory/block_allocator.hpp utils/memory/stack_allocator.hpp utils/iterator/query.hpp utils/iterator/composable.hpp utils/iterator/for_all.hpp utils/iterator/range_iterator.hpp utils/iterator/limited_map.hpp utils/iterator/iterator_accessor.hpp utils/iterator/count.hpp utils/iterator/iterator_base.hpp utils/iterator/filter.hpp utils/iterator/inspect.hpp utils/iterator/accessor.hpp utils/iterator/map.hpp utils/iterator/virtual_iter.hpp utils/iterator/flat_map.hpp utils/iterator/lambda_iterator.hpp utils/iterator/iterator.hpp utils/stacktrace.hpp utils/datetime/datetime_error.hpp utils/datetime/timestamp.hpp utils/reference_wrapper.hpp utils/underlying_cast.hpp query_engine/i_code_cpu.hpp query_engine/query_stripped.hpp"
paths="barrier/barrier.hpp barrier/common.hpp storage/model/properties/floating.hpp storage/model/properties/all.hpp storage/model/properties/bool.hpp storage/model/properties/traversers/consolewriter.hpp storage/model/properties/traversers/jsonwriter.hpp storage/model/properties/array.hpp storage/model/properties/property_family.hpp storage/model/properties/property.hpp storage/model/properties/properties.hpp storage/model/properties/integral.hpp storage/model/properties/double.hpp storage/model/properties/string.hpp storage/model/properties/utils/math_operations.hpp storage/model/properties/utils/unary_negation.hpp storage/model/properties/utils/modulo.hpp storage/model/properties/property_holder.hpp storage/model/properties/float.hpp storage/model/properties/null.hpp storage/model/properties/flags.hpp storage/model/properties/int32.hpp storage/model/properties/number.hpp storage/model/properties/int64.hpp logging/default.hpp logging/log.hpp logging/logger.hpp logging/levels.hpp io/network/addrinfo.hpp io/network/network_error.hpp io/network/socket.hpp mvcc/id.hpp utils/exceptions/basic_exception.hpp utils/border.hpp utils/total_ordering.hpp utils/auto_scope.hpp utils/crtp.hpp utils/order.hpp utils/likely.hpp utils/option.hpp utils/option_ptr.hpp utils/memory/block_allocator.hpp utils/memory/stack_allocator.hpp utils/iterator/query.hpp utils/iterator/composable.hpp utils/iterator/for_all.hpp utils/iterator/range_iterator.hpp utils/iterator/limited_map.hpp utils/iterator/iterator_accessor.hpp utils/iterator/count.hpp utils/iterator/iterator_base.hpp utils/iterator/filter.hpp utils/iterator/inspect.hpp utils/iterator/accessor.hpp utils/iterator/map.hpp utils/iterator/virtual_iter.hpp utils/iterator/flat_map.hpp utils/iterator/combined.hpp utils/iterator/lambda_iterator.hpp utils/iterator/iterator.hpp utils/array_store.hpp utils/void.hpp storage/indexes/index_definition.hpp utils/stacktrace.hpp utils/datetime/datetime_error.hpp utils/datetime/timestamp.hpp utils/reference_wrapper.hpp utils/underlying_cast.hpp utils/numerics/saturate.hpp query_engine/i_code_cpu.hpp query_engine/query_stripped.hpp query_engine/exceptions/exceptions.hpp"
for path in $paths
do

View File

@ -277,16 +277,14 @@ VertexAccessor VertexAccessor::update() const { return CALL(update()); }
void VertexAccessor::remove() const { HALF_CALL(remove()); }
const StoredProperty<TypeGroupVertex> &
VertexAccessor::at(VertexPropertyFamily &key) const
const VertexStoredProperty &VertexAccessor::at(VertexPropertyFamily &key) const
{
return HALF_CALL(at(trans(key)));
return CALL(at(trans(key)));
}
const StoredProperty<TypeGroupVertex> &
VertexAccessor::at(VertexPropertyKey &key) const
const VertexStoredProperty &VertexAccessor::at(VertexPropertyKey &key) const
{
return HALF_CALL(at(trans(key)));
return CALL(at(trans(key)));
}
template <class V>
@ -363,16 +361,14 @@ EdgeAccessor EdgeAccessor::update() const { return CALL(update()); }
void EdgeAccessor::remove() const { HALF_CALL(remove()); }
const StoredProperty<TypeGroupEdge> &
EdgeAccessor::at(EdgePropertyFamily &key) const
const EdgeStoredProperty &EdgeAccessor::at(EdgePropertyFamily &key) const
{
return HALF_CALL(at(trans(key)));
return CALL(at(trans(key)));
}
const StoredProperty<TypeGroupEdge> &
EdgeAccessor::at(EdgePropertyKey &key) const
const EdgeStoredProperty &EdgeAccessor::at(EdgePropertyKey &key) const
{
return HALF_CALL(at(trans(key)));
return CALL(at(trans(key)));
}
template <class V>
@ -479,9 +475,13 @@ Count EdgeAccessIterator::count() { return HALF_CALL(count()); }
// ************************* VertexPropertyKey
DESTRUCTOR(VertexPropertyKey, PropertyFamilyKey);
Type VertexPropertyKey::get_type() const { return HALF_CALL(get_type()); }
// ************************* EdgePropertyKey
DESTRUCTOR(EdgePropertyKey, PropertyFamilyKey);
Type EdgePropertyKey::get_type() const { return HALF_CALL(get_type()); }
// ************************* VertexPropertyType
#define VERTEX_PROPERTY_TYPE(x) template class VertexPropertyType<x>;
INSTANTIATE_FOR_PROPERTY(VERTEX_PROPERTY_TYPE)
@ -531,15 +531,15 @@ void RecordStream<Stream>::write(const EdgeAccessor &edge)
}
template <class Stream>
void RecordStream<Stream>::write(const StoredProperty<TypeGroupEdge> &prop)
void RecordStream<Stream>::write(const VertexStoredProperty &prop)
{
HALF_CALL(write(prop));
HALF_CALL(write(trans(prop)));
}
template <class Stream>
void RecordStream<Stream>::write(const StoredProperty<TypeGroupVertex> &prop)
void RecordStream<Stream>::write(const EdgeStoredProperty &prop)
{
HALF_CALL(write(prop));
HALF_CALL(write(trans(prop)));
}
// template <class Stream>
@ -675,7 +675,8 @@ void RecordStream<Stream>::write_meta(const std::string &type)
}
template <class Stream>
void RecordStream<Stream>::write_failure(const std::map<std::string, std::string> &data)
void RecordStream<Stream>::write_failure(
const std::map<std::string, std::string> &data)
{
HALF_CALL(write_failure(data));
}
@ -720,4 +721,55 @@ const>(barrier::VertexAccessor const&&)'
description:
Move constructor VertexAccessor<VertexAccessor const>(VertexAccessor const&&)
isn't defined.
error:
/home/ktf/Workspace/memgraph/src/barrier/barrier.cpp:282:12: error: call to
'trans' is ambiguous
return CALL(at(trans(key)));
^~~~~~~~~~~~~~~~~~~~
/home/ktf/Workspace/memgraph/src/barrier/barrier.cpp:18:17: note: expanded from
macro 'CALL'
#define CALL(x) trans(HALF_CALL(x))
^~~~~
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:208:21: note: candidate
function
DUP(VertexAccessor, TRANSFORM_VALUE);
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:169:21: note: candidate
function
DUP(VertexAccessor, TRANSFORM_REF);
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:170:19: note: candidate
function
DUP(EdgeAccessor, TRANSFORM_REF);
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:174:1: note: candidate
function
TRANSFORM_REF(VertexPropertyKey,
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:25:14: note: expanded
from macro 'TRANSFORM_REF'
y const &trans(x const &l) { return ref_as<y const>(l); } \
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:176:1: note: candidate
function
TRANSFORM_REF(EdgePropertyKey,
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:25:14: note: expanded
from macro 'TRANSFORM_REF'
y const &trans(x const &l) { return ref_as<y const>(l); } \
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:182:1: note: candidate
function
TRANSFORM_REF(VertexIterator, ::iter::Virtual<const ::VertexAccessor>);
^
/home/ktf/Workspace/memgraph/include/barrier/trans.hpp:23:14: note: expanded
from macro 'TRANSFORM_REF'
x const &trans(y const &l) { return ref_as<x const>(l); } \
...
description:
There is no valid transformation for types on which trans is called.
*/