|
1 |
| -#include "swss/table.h" |
2 |
| -#include <vector> |
3 |
| -#include <fstream> |
4 |
| - |
5 | 1 | #include "Recorder.h"
|
6 | 2 |
|
7 | 3 | #include "meta/sai_serialize.h"
|
|
11 | 7 | #include <inttypes.h>
|
12 | 8 |
|
13 | 9 | #include <cstring>
|
| 10 | +#include <vector> |
| 11 | +#include <fstream> |
14 | 12 |
|
15 | 13 | using namespace sairedis;
|
16 | 14 | using namespace saimeta;
|
@@ -216,7 +214,10 @@ std::string Recorder::getTimestamp()
|
216 | 214 |
|
217 | 215 | gettimeofday(&tv, NULL);
|
218 | 216 |
|
219 |
| - size_t size = strftime(buffer, 32, "%Y-%m-%d.%T.", localtime(&tv.tv_sec)); |
| 217 | + struct tm now; |
| 218 | + localtime_r(&tv.tv_sec, &now); |
| 219 | + |
| 220 | + size_t size = strftime(buffer, 32, "%Y-%m-%d.%T.", &now); |
220 | 221 |
|
221 | 222 | snprintf(&buffer[size], 32, "%06ld", tv.tv_usec);
|
222 | 223 |
|
@@ -283,7 +284,6 @@ void Recorder::recordQueryAttributeCapabilityResponse(
|
283 | 284 | recordLine("Q|attribute_capability|" + sai_serialize_status(status) + "|" + joinFieldValues(arguments));
|
284 | 285 | }
|
285 | 286 |
|
286 |
| - |
287 | 287 | void Recorder::recordQueryAttributeEnumValuesCapability(
|
288 | 288 | _In_ const std::string& key,
|
289 | 289 | _In_ const std::vector<swss::FieldValueTuple>& arguments)
|
@@ -514,7 +514,6 @@ void Recorder::recordBulkGenericSet(
|
514 | 514 | recordLine("S|" + key + joined);
|
515 | 515 | }
|
516 | 516 |
|
517 |
| - |
518 | 517 | void Recorder::recordBulkGenericSetResponse(
|
519 | 518 | _In_ sai_status_t status,
|
520 | 519 | _In_ uint32_t objectCount,
|
@@ -833,7 +832,6 @@ void Recorder::recordRemove( \
|
833 | 832 | _X(ROUTE_ENTRY,route_entry); \
|
834 | 833 | _X(NAT_ENTRY,nat_entry); \
|
835 | 834 |
|
836 |
| - |
837 | 835 | REDIS_DECLARE_EVERY_ENTRY(DECLARE_RECORD_REMOVE_ENTRY)
|
838 | 836 |
|
839 | 837 | #define DECLARE_RECORD_CREATE_ENTRY(OT,ot) \
|
@@ -940,7 +938,6 @@ void Recorder::recordQueryAttributeCapability(
|
940 | 938 | recordQueryAttributeCapability(key, values);
|
941 | 939 | }
|
942 | 940 |
|
943 |
| - |
944 | 941 | void Recorder::recordQueryAttributeCapabilityResponse(
|
945 | 942 | _In_ sai_status_t status,
|
946 | 943 | _In_ sai_object_type_t objectType,
|
|
0 commit comments