Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Commit

Permalink
Behave like MK when there is no input
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 22, 2019
1 parent e845a2a commit 72b0867
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mkreport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,11 @@ bool dump(const Measurement &measurement, std::string &str,
m["annotations"] = measurement.report.annotations;
m["data_format_version"] = "0.2.0";
m["id"] = mk::uuid4::gen();
m["input"] = measurement.input;
if (!measurement.input.empty()) {
m["input"] = measurement.input;
} else {
m["input"] = nullptr;
}
m["input_hashes"] = nlohmann::json::array(); // conventional value
m["measurement_start_time"] = measurement.start_time;
m["options"] = nlohmann::json::array(); // conventional value
Expand Down

0 comments on commit 72b0867

Please sign in to comment.