summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-09-30 02:16:58 +0300
committerEd Tanous <ed@tanous.net>2020-10-15 18:52:46 +0300
commitb5a76932eab7d40487ffb305cd745ec155813c4e (patch)
tree193d0ba4e679be07880d661130930cd4adcb38b9 /redfish-core/lib/log_services.hpp
parentc370fad0ae67480fac19a2fe6a08be3401f48ae7 (diff)
downloadbmcweb-b5a76932eab7d40487ffb305cd745ec155813c4e.tar.xz
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies... Apparently there are a lot of places we make unnecessary copies. This fixes all of them. Not sure how to split this up into smaller patches, or if it even needs split up. It seems pretty easy to review to me, because basically every diff is identical. Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369 Signed-off-by: Ed Tanous <ed@tanous.net> Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index bbf876899f..c5b7b9d0d5 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -683,7 +683,7 @@ inline void deleteDumpEntry(crow::Response& res, const std::string& entryID,
}
inline void createDumpTaskCallback(const crow::Request& req,
- std::shared_ptr<AsyncResp> asyncResp,
+ const std::shared_ptr<AsyncResp>& asyncResp,
const uint32_t& dumpId,
const std::string& dumpPath,
const std::string& dumpType)
@@ -1067,7 +1067,7 @@ class JournalEventLogClear : public Node
};
static int fillEventLogEntryJson(const std::string& logEntryID,
- const std::string logEntry,
+ const std::string& logEntry,
nlohmann::json& logEntryJson)
{
// The redfish log format is "<Timestamp> <MessageId>,<MessageArgs>"
@@ -2418,7 +2418,7 @@ class CrashdumpClear : public Node
}
};
-static void logCrashdumpEntry(std::shared_ptr<AsyncResp> asyncResp,
+static void logCrashdumpEntry(const std::shared_ptr<AsyncResp>& asyncResp,
const std::string& logID,
nlohmann::json& logEntryJson)
{
@@ -3052,7 +3052,7 @@ class PostCodesClear : public Node
};
static void fillPostCodeEntry(
- std::shared_ptr<AsyncResp> aResp,
+ const std::shared_ptr<AsyncResp>& aResp,
const boost::container::flat_map<uint64_t, uint64_t>& postcode,
const uint16_t bootIndex, const uint64_t codeIndex = 0,
const uint64_t skip = 0, const uint64_t top = 0)
@@ -3170,7 +3170,7 @@ static void fillPostCodeEntry(
}
}
-static void getPostCodeForEntry(std::shared_ptr<AsyncResp> aResp,
+static void getPostCodeForEntry(const std::shared_ptr<AsyncResp>& aResp,
const uint16_t bootIndex,
const uint64_t codeIndex)
{
@@ -3202,7 +3202,7 @@ static void getPostCodeForEntry(std::shared_ptr<AsyncResp> aResp,
bootIndex);
}
-static void getPostCodeForBoot(std::shared_ptr<AsyncResp> aResp,
+static void getPostCodeForBoot(const std::shared_ptr<AsyncResp>& aResp,
const uint16_t bootIndex,
const uint16_t bootCount,
const uint64_t entryCount, const uint64_t skip,
@@ -3257,7 +3257,7 @@ static void getPostCodeForBoot(std::shared_ptr<AsyncResp> aResp,
bootIndex);
}
-static void getCurrentBootNumber(std::shared_ptr<AsyncResp> aResp,
+static void getCurrentBootNumber(const std::shared_ptr<AsyncResp>& aResp,
const uint64_t skip, const uint64_t top)
{
uint64_t entryCount = 0;