Display microsecond timestamps if the log file has them #132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements comprehensive microsecond timestamp support for the Tableau Log Viewer, including proper sorting, enhanced display formatting, and optimized copy functionality for data processing workflows. Hyper logs and soon, Tableau C++ logs, will have microsecond timestamps.
Features Implemented
🔍 Comprehensive Microsecond Support
MicroTimestampclass (src/microtimestamp.h,src/microtimestamp.cpp) that preserves full 6-digit microsecond precision📊 Enhanced Display & User Experience
12:34:56.123 456with space separator for improved readability12:34:56.123📋 Smart Copy Functionality
12:34:56.123 456(with space for readability)12:34:56.123456(without space for data processing)Technical Implementation
Core Components
LogTab::CopyItemDetails()for intelligent timestamp handlingparseTs()function to use MicroTimestamp objects throughout the systemArchitecture Changes
Files Modified
src/microtimestamp.h- New header for MicroTimestamp classsrc/microtimestamp.cpp- Complete MicroTimestamp implementationsrc/tableau-log-viewer.pro- Added new source files to buildsrc/treemodel.cpp- Enhanced data model with microsecond support and copy rolesrc/logtab.cpp- Updated copy functionality and time mode detectionTesting & Quality
Benefits
Before/After Comparison
Display
12:34:56.123(truncated microseconds)12:34:56.123 456(full precision with readable formatting)Copy Operations
12:34:56.123456(clean format for data processing)Sorting