File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed
Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change 1818
1919# Source files
2020SOURCES = src/sensor-data.cpp
21- LIB_SOURCES = src/csv_parser.cpp src/json_parser.cpp src/error_detector.cpp src/file_utils.cpp src/sensor_data_transformer.cpp src/data_counter.cpp src/error_lister.cpp src/error_summarizer.cpp src/stats_analyser.cpp src/latest_finder.cpp src/data_reader.cpp
21+ LIB_SOURCES = src/csv_parser.cpp src/json_parser.cpp src/error_detector.cpp src/file_utils.cpp src/sensor_data_transformer.cpp src/data_counter.cpp src/error_lister.cpp src/error_summarizer.cpp src/stats_analyser.cpp src/latest_finder.cpp
2222TEST_SOURCES = tests/test_csv_parser.cpp tests/test_json_parser.cpp tests/test_error_detector.cpp tests/test_file_utils.cpp tests/test_date_utils.cpp tests/test_common_arg_parser.cpp tests/test_data_reader.cpp tests/test_file_collector.cpp tests/test_command_base.cpp tests/test_stats_analyser.cpp
2323
2424# Object files
Original file line number Diff line number Diff line change 77#include < string>
88#include < vector>
99#include < map>
10- #include < mutex>
1110#include " date_utils.h"
1211#include " csv_parser.h"
1312#include " json_parser.h"
1615// Centralized data reader that handles file/stdin, CSV/JSON, and date filtering
1716class DataReader {
1817private:
19- static std::mutex outputMutex; // Static mutex for thread-safe console output
2018 long long minDate;
2119 long long maxDate;
2220 int verbosity;
@@ -88,7 +86,6 @@ class DataReader {
8886 template <typename Callback>
8987 void processStdin (Callback callback) {
9088 if (verbosity >= 1 ) {
91- std::lock_guard<std::mutex> lock (outputMutex);
9289 std::cerr << " Reading from stdin (format: " << inputFormat << " )..." << std::endl;
9390 }
9491 // For stdin: "csv" means CSV, anything else (including "auto" and "json") means JSON
@@ -99,7 +96,6 @@ class DataReader {
9996 template <typename Callback>
10097 void processFile (const std::string& filename, Callback callback) {
10198 if (verbosity >= 1 ) {
102- std::lock_guard<std::mutex> lock (outputMutex);
10399 std::cout << " Processing file: " << filename << std::endl;
104100 if (tailLines > 0 ) {
105101 std::cout << " (reading last " << tailLines << " lines only)" << std::endl;
@@ -178,7 +174,6 @@ class DataReader {
178174 } else {
179175 std::ifstream infile (filename);
180176 if (!infile) {
181- std::lock_guard<std::mutex> lock (outputMutex);
182177 return ;
183178 }
184179
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments