Skip to content

Commit

Permalink
changelog: update for new release and bump version number
Browse files Browse the repository at this point in the history
also some refactoring to streamline code style.
  • Loading branch information
breuner committed Jun 3, 2024
1 parent 25e86e2 commit b673919
Show file tree
Hide file tree
Showing 10 changed files with 259 additions and 264 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog of elbencho

## v3.0.8 (work in progress)
## v3.0.9 (June 04, 2024)

### New Features & Enhancements
* Added options to read and stat files immediately after creation while they are still open. (See "--readinline" and "--statinline".)
Expand All @@ -17,7 +17,7 @@
* Added new script in `build_helpers/chroot` to build static executable via Alpine chroot.

### Contributors
Thanks to Casey Peel, Michael Shustin, Erez Horev and Github user russki for code contributions. Thanks to Andy Black and Github user mhanafi1970 for helpful comments and suggestions.
Thanks to Casey Peel, Michael Shustin, Erez Horev and Github user russki for code contributions. Thanks to Andy Black, Jean-Baptiste Denis and Github user mhanafi1970 for helpful comments and suggestions.

## v3.0.7 (March 21, 2024)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
EXE_NAME ?= elbencho
EXE_VER_MAJOR ?= 3
EXE_VER_MINOR ?= 0
EXE_VER_PATCHLEVEL ?= 8
EXE_VER_PATCHLEVEL ?= 9
EXE_VERSION ?= $(EXE_VER_MAJOR).$(EXE_VER_MINOR)-$(EXE_VER_PATCHLEVEL)
EXE ?= $(BIN_PATH)/$(EXE_NAME)
EXE_UNSTRIPPED ?= $(EXE)-unstripped
Expand Down
16 changes: 8 additions & 8 deletions source/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ typedef std::vector<uint64_t> UInt64Vec;
#define PHASENAME_PUTBUCKETACL "PUTBACL"
#define PHASENAME_GETBUCKETACL "GETBACL"

// S3-only phases
#define PHASENAME_GET_S3_OBJECT_METADATA "GET_S3_OBJECT_META"
#define PHASENAME_PUT_S3_OBJECT_METADATA "PUT_S3_OBJECT_META"
#define PHASENAME_DEL_S3_OBJECT_METADATA "DEL_S3_OBJECT_META"
#define PHASENAME_GET_S3_BUCKET_METADATA "GET_S3_BUCKET_META"
#define PHASENAME_PUT_S3_BUCKET_METADATA "PUT_S3_BUCKET_META"
#define PHASENAME_DEL_S3_BUCKET_METADATA "DEL_S3_BUCKET_META"
// special S3 metadata phases for multiple metadata operation types
#define PHASENAME_GETOBJECTMETADATA "GETOBJMD"
#define PHASENAME_PUTOBJECTMETADATA "PUTOBJMD"
#define PHASENAME_DELOBJECTMETADATA "DELOBJMD"
#define PHASENAME_GETBUCKETMETADATA "GETBUCKETMD"
#define PHASENAME_PUTBUCKETMETADATA "PUTBUCKETMD"
#define PHASENAME_DELBUCKETMETADATA "DELBUCKETMD"


// human-readable entry type in current benchmark phase
Expand All @@ -62,7 +62,7 @@ typedef std::vector<uint64_t> UInt64Vec;
* (Only exact matches are assumed to be compatible, that's why this can differ from the program
* version.)
*/
#define HTTP_PROTOCOLVERSION "3.0.4"
#define HTTP_PROTOCOLVERSION "3.0.9"

/**
* Default access mode bits for new files.
Expand Down
38 changes: 19 additions & 19 deletions source/ProgArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,12 @@ void ProgArgs::defineAllowedArgs()
/*s3b*/ (ARG_S3BUCKETACLPUT_LONG, bpo::bool_switch(&this->runS3BucketAclPut),
"Put S3 bucket ACLs. This requires definition of grantee, grantee type and "
"permissions.")
/*s3b*/ (ARG_S3_BUCKET_TAG, bpo::bool_switch(&this->doS3BucketTag),
/*s3b*/ (ARG_S3BUCKETTAG_LONG, bpo::bool_switch(&this->doS3BucketTag),
"Activate bucket tagging operations during other benchmarking phases: "
"Adding of bucket tags in create bucket phase, "
"reading of tags in stat bucket phase and deletion of tags in delete bucket phase.")
/*s3b*/ (ARG_S3_BUCKET_TAG_VERIFY, bpo::bool_switch(&this->doS3BucketTagVerify),
"Verify the correctness of S3 bucket tagging results (requires \"--" ARG_S3_BUCKET_TAG "\")")
/*s3b*/ (ARG_S3BUCKETTAGVERIFY_LONG, bpo::bool_switch(&this->doS3BucketTagVerify),
"Verify the correctness of S3 bucket tagging results (requires \"--" ARG_S3BUCKETTAG_LONG "\")")
/*s3e*/ (ARG_S3ENDPOINTS_LONG, bpo::value(&this->s3EndpointsStr),
"Comma-separated list of S3 endpoints. When this argument is used, the given "
"benchmark paths are used as bucket names. Also see \"--" ARG_S3ACCESSKEY_LONG "\" & "
Expand Down Expand Up @@ -541,13 +541,13 @@ void ProgArgs::defineAllowedArgs()
"S3 object prefix. This will be prepended to all object names when the benchmark path "
"is a bucket. (A sequence of 3 to 16 \"" RAND_PREFIX_MARKS_SUBSTR "\" chars will be "
"replaced by a random hex string of the same length.)")
/*s3o*/ (ARG_S3_OBJECT_LOCK_CFG, bpo::bool_switch(&this->doS3ObjectLockCfg),
/*s3o*/ (ARG_S3OBJLOCKCFG_LONG, bpo::bool_switch(&this->doS3ObjectLockCfg),
"Activate object lock configuration creation")
/*s3o*/ (ARG_S3_OBJECT_LOCK_CFG_VERIFY, bpo::bool_switch(&this->doS3ObjectLockCfgVerify),
/*s3o*/ (ARG_S3OBJLOCKCFGVERIFY_LONG, bpo::bool_switch(&this->doS3ObjectLockCfgVerify),
"Verify the correctness of object lock configurations")
/*s3o*/ (ARG_S3_OBJECT_TAG, bpo::bool_switch(&this->doS3ObjectTag),
/*s3o*/ (ARG_S3OBJTAG_LONG, bpo::bool_switch(&this->doS3ObjectTag),
"Activate S3 object tagging")
/*s3o*/ (ARG_S3_OBJECT_TAG_VERIFY, bpo::bool_switch(&this->doS3ObjectTagVerify),
/*s3o*/ (ARG_S3OBJTAGVERIFY_LONG, bpo::bool_switch(&this->doS3ObjectTagVerify),
"Verify the correctness of created S3 object tags")
/*s3r*/ (ARG_S3RANDOBJ_LONG, bpo::bool_switch(&this->useS3RandObjSelect),
"Read at random offsets and randomly select a new object for each S3 block read. Only "
Expand Down Expand Up @@ -3021,12 +3021,12 @@ void ProgArgs::setFromPropertyTreeForService(bpt::ptree& tree)
doS3AclVerify = tree.get<bool>(ARG_S3ACLVERIFY_LONG);
doS3ListObjVerify = tree.get<bool>(ARG_S3LISTOBJVERIFY_LONG);
doStatInline = tree.get<bool>(ARG_STATFILESINLINE_LONG);
doS3BucketTag = tree.get<bool>(ARG_S3_BUCKET_TAG);
doS3BucketTagVerify = tree.get<bool>(ARG_S3_BUCKET_TAG_VERIFY);
doS3ObjectTag = tree.get<bool>(ARG_S3_OBJECT_TAG);
doS3ObjectTagVerify = tree.get<bool>(ARG_S3_OBJECT_TAG_VERIFY);
doS3ObjectLockCfg = tree.get<bool>(ARG_S3_OBJECT_LOCK_CFG);
doS3ObjectLockCfgVerify = tree.get<bool>(ARG_S3_OBJECT_LOCK_CFG_VERIFY);
doS3BucketTag = tree.get<bool>(ARG_S3BUCKETTAG_LONG);
doS3BucketTagVerify = tree.get<bool>(ARG_S3BUCKETTAGVERIFY_LONG);
doS3ObjectTag = tree.get<bool>(ARG_S3OBJTAG_LONG);
doS3ObjectTagVerify = tree.get<bool>(ARG_S3OBJTAGVERIFY_LONG);
doS3ObjectLockCfg = tree.get<bool>(ARG_S3OBJLOCKCFG_LONG);
doS3ObjectLockCfgVerify = tree.get<bool>(ARG_S3OBJLOCKCFGVERIFY_LONG);
doTruncate = tree.get<bool>(ARG_TRUNCATE_LONG);
doTruncToSize = tree.get<bool>(ARG_TRUNCTOSIZE_LONG);
fadviseFlags = tree.get<unsigned>(ARG_FADVISE_LONG);
Expand Down Expand Up @@ -3228,12 +3228,12 @@ void ProgArgs::getAsPropertyTreeForService(bpt::ptree& outTree, size_t serviceRa
outTree.put(ARG_SENDBUFSIZE_LONG, sockSendBufSize);
outTree.put(ARG_STATFILES_LONG, runStatFilesPhase);
outTree.put(ARG_STATFILESINLINE_LONG, doStatInline);
outTree.put(ARG_S3_BUCKET_TAG, doS3BucketTag);
outTree.put(ARG_S3_BUCKET_TAG_VERIFY, doS3BucketTagVerify);
outTree.put(ARG_S3_OBJECT_TAG, doS3ObjectTag);
outTree.put(ARG_S3_OBJECT_TAG_VERIFY, doS3ObjectTagVerify);
outTree.put(ARG_S3_OBJECT_LOCK_CFG, doS3ObjectLockCfg);
outTree.put(ARG_S3_OBJECT_LOCK_CFG_VERIFY, doS3ObjectLockCfgVerify);
outTree.put(ARG_S3BUCKETTAG_LONG, doS3BucketTag);
outTree.put(ARG_S3BUCKETTAGVERIFY_LONG, doS3BucketTagVerify);
outTree.put(ARG_S3OBJTAG_LONG, doS3ObjectTag);
outTree.put(ARG_S3OBJTAGVERIFY_LONG, doS3ObjectTagVerify);
outTree.put(ARG_S3OBJLOCKCFG_LONG, doS3ObjectLockCfg);
outTree.put(ARG_S3OBJLOCKCFGVERIFY_LONG, doS3ObjectLockCfgVerify);
outTree.put(ARG_SYNCPHASE_LONG, runSyncPhase);
outTree.put(ARG_TRUNCATE_LONG, doTruncate);
outTree.put(ARG_TRUNCTOSIZE_LONG, doTruncToSize);
Expand Down
40 changes: 20 additions & 20 deletions source/ProgArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace bpo = boost::program_options;
namespace bpt = boost::property_tree;

/* command line args and config file options (sorted by "ARG_..." column).
/* command line args and config file options (sorted alphabetically by "ARG_..." column).
note: keep length of "_LONG" argument names without parameters within a max length of 16 chars
and "_LONG" arguments with parameters to a max of 12 chars, as the description column
in the help output otherwise gets too small. */
Expand Down Expand Up @@ -144,6 +144,8 @@ namespace bpt = boost::property_tree;
#define ARG_S3ACLVERIFY_LONG "s3aclverify"
#define ARG_S3BUCKETACLGET_LONG "s3baclget"
#define ARG_S3BUCKETACLPUT_LONG "s3baclput"
#define ARG_S3BUCKETTAG_LONG "s3btag"
#define ARG_S3BUCKETTAGVERIFY_LONG "s3btagverify"
#define ARG_S3ENDPOINTS_LONG "s3endpoints"
#define ARG_S3FASTGET_LONG "s3fastget"
#define ARG_S3IGNOREERRORS_LONG "s3ignoreerrors"
Expand All @@ -155,19 +157,15 @@ namespace bpt = boost::property_tree;
#define ARG_S3MULTIDELETE_LONG "s3multidel"
#define ARG_S3NOMPCHECK_LONG "s3nompcheck"
#define ARG_S3OBJECTPREFIX_LONG "s3objprefix"
#define ARG_S3OBJLOCKCFG_LONG "s3olockcfg"
#define ARG_S3OBJLOCKCFGVERIFY_LONG "s3olockcfgverify"
#define ARG_S3OBJTAG_LONG "s3otag"
#define ARG_S3OBJTAGVERIFY_LONG "s3otagverify"
#define ARG_S3RANDOBJ_LONG "s3randobj"
#define ARG_S3REGION_LONG "s3region"
#define ARG_S3SIGNPAYLOAD_LONG "s3sign"
#define ARG_S3TRANSMAN_LONG "s3transman"
#define ARG_S3STATDIRS_LONG "s3statdirs"

#define ARG_S3_BUCKET_TAG "s3btag"
#define ARG_S3_BUCKET_TAG_VERIFY "s3btagverify"
#define ARG_S3_OBJECT_TAG "s3otag"
#define ARG_S3_OBJECT_TAG_VERIFY "s3otagverify"
#define ARG_S3_OBJECT_LOCK_CFG "s3olockcfg"
#define ARG_S3_OBJECT_LOCK_CFG_VERIFY "s3olockcfgverify"

#define ARG_S3TRANSMAN_LONG "s3transman"
#define ARG_SENDBUFSIZE_LONG "sendbuf"
#define ARG_SERVERS_LONG "servers"
#define ARG_SERVERSFILE_LONG "serversfile"
Expand Down Expand Up @@ -547,6 +545,18 @@ class ProgArgs
const IntVec& getBenchPathFDs() const { return benchPathFDsVec; }
BenchPathType getBenchPathType() const { return benchPathType; }

bool getS3BucketMetadataRequested() const { return doS3BucketTag || doS3ObjectLockCfg; }
bool getS3ObjectMetadataRequested() const { return doS3ObjectTag; }
bool getRunS3GetObjectMetadata() const { return getS3ObjectMetadataRequested(); }
bool getRunS3PutObjectMetadata() const
{ return getS3ObjectMetadataRequested() && runCreateFilesPhase; }
bool getRunS3DelObjectMetadata() const
{ return getS3ObjectMetadataRequested() && runDeleteFilesPhase; }
bool getRunS3GetBucketMetadata() const { return getS3BucketMetadataRequested(); }
bool getRunS3PutBucketMetadata() const
{ return getS3BucketMetadataRequested() && runCreateDirsPhase; }
bool getRunS3DelBucketMetadata() const
{ return getS3BucketMetadataRequested() && runDeleteDirsPhase; }

// getters for config options in alphabetic order...

Expand Down Expand Up @@ -649,16 +659,6 @@ class ProgArgs
bool getRunS3BucketAclPut() const { return runS3BucketAclPut; }
bool getRunS3BucketAclGet() const { return runS3BucketAclGet; }
bool getRunS3StatDirs() const { return runS3StatDirs; }

[[nodiscard]] bool s3BucketMetadataRequested() const noexcept { return doS3BucketTag || doS3ObjectLockCfg; }
[[nodiscard]] bool s3ObjectMetadataRequested() const noexcept { return doS3ObjectTag; }
[[nodiscard]] bool getRunS3GetObjectMetadata() const noexcept { return s3ObjectMetadataRequested(); }
[[nodiscard]] bool getRunS3PutObjectMetadata() const noexcept { return s3ObjectMetadataRequested() && runCreateFilesPhase; }
[[nodiscard]] bool getRunS3DelObjectMetadata() const noexcept { return s3ObjectMetadataRequested() && runDeleteFilesPhase; }
[[nodiscard]] bool getRunS3GetBucketMetadata() const noexcept { return s3BucketMetadataRequested(); }
[[nodiscard]] bool getRunS3PutBucketMetadata() const noexcept { return s3BucketMetadataRequested() && runCreateDirsPhase; }
[[nodiscard]] bool getRunS3DelBucketMetadata() const noexcept { return s3BucketMetadataRequested() && runDeleteDirsPhase; }

bool getRunServiceInForeground() const { return runServiceInForeground; }
bool getRunStatFilesPhase() const { return runStatFilesPhase; }
bool getRunSyncPhase() const { return runSyncPhase; }
Expand Down
2 changes: 1 addition & 1 deletion source/Statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ void Statistics::printPhaseResultsTableHeaderToStream(std::ostream& outStream)
% "LAST DONE"
<< std::endl;
outStream << boost::format(phaseResultsFormatStr)
% "===================="
% "==========="
% "================"
% ""
% "=========="
Expand Down
2 changes: 1 addition & 1 deletion source/Statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Statistics
WorkersSharedData& workersSharedData;
WorkerVec& workerVec;
bool consoleBufferingDisabled{false};
const std::string phaseResultsFormatStr{"%|-20| %|-17|%|1| %|11| %|11|"};
const std::string phaseResultsFormatStr{"%|-11| %|-17|%|1| %|11| %|11|"};
const std::string phaseResultsLeftFormatStr{"%|-9| %|-17|%|1| "}; // left side format str
const std::string phaseResultsFooterStr = std::string(3, '-');
CPUUtil liveCpuUtil; // updated by live stats loop or through http service live stat calls
Expand Down
12 changes: 6 additions & 6 deletions source/toolkits/TranslatorTk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ std::string TranslatorTk::benchPhaseToPhaseName(BenchPhase benchPhase, const Pro
case BenchPhase_LISTOBJECTS: return PHASENAME_LISTOBJECTS;
case BenchPhase_LISTOBJPARALLEL: return PHASENAME_LISTOBJPAR;
case BenchPhase_MULTIDELOBJ: return PHASENAME_MULTIDELOBJ;
case BenchPhase_GET_S3_OBJECT_MD: return PHASENAME_GET_S3_OBJECT_METADATA;
case BenchPhase_PUT_S3_OBJECT_MD: return PHASENAME_PUT_S3_OBJECT_METADATA;
case BenchPhase_DEL_S3_OBJECT_MD: return PHASENAME_DEL_S3_OBJECT_METADATA;
case BenchPhase_GET_S3_BUCKET_MD: return PHASENAME_GET_S3_BUCKET_METADATA;
case BenchPhase_PUT_S3_BUCKET_MD: return PHASENAME_PUT_S3_BUCKET_METADATA;
case BenchPhase_DEL_S3_BUCKET_MD: return PHASENAME_DEL_S3_BUCKET_METADATA;
case BenchPhase_GET_S3_OBJECT_MD: return PHASENAME_GETOBJECTMETADATA;
case BenchPhase_PUT_S3_OBJECT_MD: return PHASENAME_PUTOBJECTMETADATA;
case BenchPhase_DEL_S3_OBJECT_MD: return PHASENAME_DELOBJECTMETADATA;
case BenchPhase_GET_S3_BUCKET_MD: return PHASENAME_GETBUCKETMETADATA;
case BenchPhase_PUT_S3_BUCKET_MD: return PHASENAME_PUTBUCKETMETADATA;
case BenchPhase_DEL_S3_BUCKET_MD: return PHASENAME_DELBUCKETMETADATA;
default:
{ // should never happen
throw ProgException("Phase name requested for unknown/invalid phase type: " +
Expand Down
Loading

0 comments on commit b673919

Please sign in to comment.