Skip to content

Fix decoder benchmark. #753

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

Merged
merged 1 commit into from
Feb 17, 2020
Merged
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
12 changes: 6 additions & 6 deletions sbe-benchmarks/src/main/cpp/SbeCarCodecBench.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
car.putModel(MODEL, MODELLEN);

return car.encodedLength();
};
}

virtual std::uint64_t decode(const char *buffer, const std::uint64_t bufferLength)
{
car.wrapForDecode((char *)buffer, 0, Car::sbeBlockLength(), Car::sbeSchemaVersion(), bufferLength);

int64_t tmpInt;
const char *tmpChar;
double tmpDouble;
bool tmpBool;
volatile int64_t tmpInt;
volatile const char *tmpChar;
volatile double tmpDouble;
volatile bool tmpBool;

tmpInt = car.serialNumber();
tmpInt = car.modelYear();
Expand Down Expand Up @@ -139,7 +139,7 @@ class SbeCarCodecBench : public CodecBench<SbeCarCodecBench>
(void)tmpBool;

return car.encodedLength();
};
}

private:
Car car;
Expand Down