8000 Feature/refactor arangobench by cpjulia · Pull Request #14548 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
80536ea
Started refactoring with Velocypack
cpjulia Jul 21, 2021
4abf968
Test for account email change
cpjulia Jul 22, 2021
008cea9
Integrated Velocypack to document-import and removed comments that we…
cpjulia Jul 22, 2021
9a7c7c2
Integrated arangobench to Velocypack
cpjulia Jul 27, 2021
054662f
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Jul 27, 2021
e9910cd
Fixed compilation bug by adding const to the payload function definit…
cpjulia Jul 27, 2021
0638ac9
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Jul 27, 2021
515e159
Removed unnecessary indentation from file
cpjulia Jul 27, 2021
335414a
Fixed typos in document testkeys
cpjulia Jul 27, 2021
e32bbae
Apply suggestions from code review
cpjulia Jul 28, 2021
92383c8
Applied suggested changes on review
cpjulia Jul 28, 2021
a01a3b2
Merge branch 'feature/refactor-arangobench' of github.com:arangodb/ar…
cpjulia Jul 28, 2021
68be152
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Jul 28, 2021
dc6eb5c
Added log topic BENCH
cpjulia Jul 28, 2021
79a35f4
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Jul 28, 2021
61a108d
Merged url, type and payload functions into one, changed type of LOG …
cpjulia Jul 29, 2021
38dca35
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
jsteemann Jul 29, 2021
f2ff275
Fixes for results calculations
jsteemann Jul 29, 2021
b113e67
simplify some test cases
jsteemann Jul 30, 2021
14e930b
slightly clean up API
jsteemann Jul 30, 2021
436a6f0
simplify request handling
jsteemann Jul 30, 2021
11b44d3
simplify test cases
jsteemann Jul 30, 2021
03aeb2c
simplify test cases
jsteemann Jul 30, 2021
07ee251
simplify test cases
jsteemann Jul 30, 2021
630603a
Removed escape for character % within a string that was causing compi…
cpjulia Jul 30, 2021
b8d61a3
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Jul 30, 2021
91b147b
reduce formatting differences in main files
jsteemann Aug 2, 2021
03f57f4
micro optimizations
jsteemann Aug 2, 2021
b42c2d5
set some velocypack Options for Builder
jsteemann Aug 2, 2021
8b4b981
allow recycling of SimpleHttpResult objects
jsteemann Aug 2, 2021
23db23c
add "bench" log topic
jsteemann Aug 2, 2021
760b2b4
unrolled case-insensitive comparison
jsteemann Aug 3, 2021
b0c136a
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
jsteemann Aug 3, 2021
00a6f43
Merge branch 'devel' of github.com:arangodb/arangodb into feature/ref…
cpjulia Aug 3, 2021
c948826
CHANGELOG
cpjulia Aug 3, 2021
07ce765
fix gtest
jsteemann Aug 3, 2021
704dad5
Update arangosh/Benchmark/testcases/AqlInsertTest.h
jsteemann Aug 4, 2021
3c90697
address review comments
jsteemann Aug 4, 2021
f95b976
fix error counters for batching
jsteemann Aug 4, 2021
2ecf023
fix some out-of-range casts reported by ASan
jsteemann Aug 4, 2021
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
Prev Previous commit
Next Next commit
simplify test cases
  • Loading branch information
jsteemann committed Jul 30, 2021
commit 11b44d39efd918cfb73e13e39d18995da1d7b10c
2 changes: 1 addition & 1 deletion arangosh/Benchmark/testcases/DocumentCreationTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace arangodb::arangobench {

void buildRequest(int threadNumber, size_t threadCounter,
size_t globalCounter, BenchmarkOperation::RequestData& requestData) const override {
requestData.url = std::string("/_api/document?collection=") + _arangobench.collection();
requestData.url = std::string("/_api/document?collection=") + _arangobench.collection() + "&silent=true";
requestData.type = rest::RequestType::POST;
using namespace arangodb::velocypack;
requestData.payload.openObject();
Expand Down
36 changes: 14 additions & 22 deletions arangosh/Benchmark/testcases/DocumentCrudTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,28 @@ namespace arangodb::arangobench {

void buildRequest(int threadNumber, size_t threadCounter,
size_t globalCounter, BenchmarkOperation::RequestData& requestData) const override {
size_t const mod = globalCounter % 5;
size_t keyId = static_cast<size_t>(globalCounter / 5);
std::string const key = "testkey" + StringUtils::itoa(keyId);
size_t const mod = globalCounter % 5;

if (mod == 0) {
requestData.url = std::string("/_api/document?collection=" + _arangobench.collection());
} else {
size_t keyId = (size_t)(globalCounter / 5);
std::string const key = "testkey" + StringUtils::itoa(keyId);
requestData.url = std::string("/_api/document/" + _arangobench.collection() + "/" + key);
}
if (mod == 0) {
requestData.url = std::string("/_api/document?collection=" + _arangobench.collection()) + "&silent=true";
requestData.type = rest::RequestType::POST;
} else if (mod == 1) {
requestData.type = rest::RequestType::GET;
} else if (mod == 2) {
requestData.type = rest::RequestType::PATCH;
} else if (mod == 3) {
requestData.type = rest::RequestType::GET;
} else if (mod == 4) {
requestData.type = rest::RequestType::DELETE_REQ;
} else {
TRI_ASSERT(false);
requestData.type = rest::RequestType::GET;
requestData.url = std::string("/_api/document/" + _arangobench.collection() + "/" + key);
if (mod == 2) {
requestData.type = rest::RequestType::PATCH;
} else if (mod == 4) {
requestData.type = rest::RequestType::DELETE_REQ;
} else {
requestData.type = rest::RequestType::GET;
}
}
if (mod == 0 || mod == 2) {
uint64_t n = _arangobench.complexity();
size_t keyId = static_cast<size_t>(globalCounter / 5);
using namespace arangodb::velocypack;
requestData.payload.openObject();
requestData.payload.add("_key", Value(std::string("testkey") + std::to_string(keyId)));
requestData.payload.add(StaticStrings::KeyString, Value(key));
uint64_t n = _arangobench.complexity();
for (uint64_t i = 1; i <= n; ++i) {
bool value = (mod == 0) ? true : false;
requestData.payload.add(std::string("value") + std::to_string(i), Value(value));
Expand All @@ -82,7 +75,6 @@ namespace arangodb::arangobench {
}
}

//log in only one place, this returns string for the description;
char const* getDescription() const noexcept override {
return "will perform a mix of insert, update, get and remove operations for documents. 20% of the operations will be single-document inserts, 20% of the operations will be single-document updates, 40% of the operations are single-document read requests, and 20% of the operations will be single-document removals. There will be a total of --requests operations. The --complexity parameter can be used to control the number of attributes for the inserted and updated documents.";
}
Expand Down
0