Module binary

Module binary 

Source
Expand description

Binary export module for high-performance memory tracking data export.

Features:

  • 3x faster than JSON export with 60%+ smaller file size
  • Lock-free, single-threaded design for simplicity
  • Compatible with existing JSON/HTML export APIs
  • Modular architecture for easy testing and maintenance

Re-exports§

pub use format::BinaryExportMode;
pub use format::FileHeader;
pub use format::FORMAT_VERSION;
pub use format::MAGIC_BYTES;
pub use html_export::export_binary;
pub use html_export::export_binary_optimized;
pub use html_export::export_binary_to_both;
pub use html_export::export_binary_to_dashboard;
pub use html_export::export_binary_to_html;
pub use html_export::export_binary_to_html_both;
pub use html_export::export_binary_to_html_system;
pub use html_export::export_binary_to_json;
pub use html_export::export_binary_with_config;
pub use html_export::export_binary_with_format;
pub use html_export::show_export_options;
pub use html_export::BinaryOutputFormat;
pub use reader::BinaryReader;
pub use writer::BinaryWriter;
pub use html_converter::*;

Modules§

format
Binary file format definitions using simple TLV (Type-Length-Value) structure
html_converter
Binary to HTML conversion functionality Converts binary memscope files to HTML reports using clean_dashboard.html template
html_export
Binary to HTML export functionality
reader
Binary data reader for parsing allocation records from binary files
writer
Binary data writer for efficient allocation record serialization

Structs§

BatchProcessor
Batch processor for efficient record processing
BatchProcessorBuilder
Builder for creating BatchProcessor with custom configuration
BatchProcessorConfig
Configuration for batch processing behavior
BatchProcessorStats
Statistics about batch processing performance
BinaryAllocationData
Binary allocation data structure for direct HTML processing
BinaryExportConfig
Binary export configuration with advanced metrics support
BinaryExportConfigBuilder
Builder pattern for BinaryExportConfig
BinaryFileInfo
Binary file type information
BinaryHtmlExportConfig
Configuration for binary to HTML export operations
BinaryHtmlExportStats
Statistics for binary to HTML export operations
BinaryHtmlStats
Statistics for binary HTML write operations
BinaryHtmlWriter
Binary HTML writer for direct conversion from binary data to HTML
BinaryHtmlWriterConfig
Configuration for the binary HTML writer
BinaryIndex
Main binary file index containing all metadata needed for fast access
BinaryIndexBuilder
Builder for creating binary file indexes
BinaryParser
Binary parser for optimized file conversion
BinaryTemplateData
Binary template data structure for HTML generation
BinaryTemplateEngine
Binary template engine for processing binary-specific templates
BinaryTemplateEngineConfig
Configuration for the binary template engine
BinaryTemplateEngineStats
Statistics for binary template engine performance
CacheEntry
Cache entry metadata for tracking cache validity and usage
CacheStats
Statistics about cache performance
CategorizedTypes
Types categorized by their complexity characteristics
CompactAllocationIndex
Compact allocation index using relative offsets and compressed data
ComplexTypeAnalysis
Complex type analysis results for dashboard display
ComplexTypeAnalyzer
Complex type analyzer for processing allocation data
ComplexTypeSummary
Summary statistics for complex type analysis
DashboardExportStats
Dashboard export statistics
DashboardOptions
Unified dashboard export options
ErrorRecoveryManager
Simplified error recovery manager
ErrorReport
Error report summary
ErrorStatistics
Error statistics for basic trend analysis
FfiCallGraph
FFI call graph for visualization
FfiHotspot
FFI hotspot information
FfiSafetyAnalysis
FFI safety analysis results for dashboard display
FfiSafetyAnalyzer
FFI safety analyzer for processing allocation data
FfiSafetySummary
Summary statistics for FFI safety analysis
FieldParser
Selective field parser that can parse only requested fields
FieldParserConfig
Configuration for field parsing behavior
FieldParserStats
Statistics about field parsing performance
FilterEngine
Multi-level filtering engine for efficient record filtering
FilterEngineBuilder
Builder for creating FilterEngine with custom configuration
FilterOptimizer
Utility functions for filter optimization
FilterStats
Statistics about filtering performance
GenericInstantiation
Information about a generic type instantiation
GenericTypeAnalysis
Generic type analysis results
GraphEdge
Edge in the relationship graph
GraphNode
Node in the relationship graph
IndexCache
Index cache manager with LRU eviction and intelligent validation
IndexCacheConfig
Configuration for the index cache
OptimizedRecord
Optimized record structure with pre-formatted fields
PartialAllocationInfo
Partial allocation information with only requested fields
QuickFilterData
Quick filtering data for large files to enable fast pre-filtering
RecordBatch
Batch of records to be processed together
RecordMetadata
Record metadata used during index building
RecoveryConfig
Recovery configuration
RecoveryResult
Recovery attempt result
RelationshipGraph
D3.js compatible graph structure
ResourceConfig
Resource embedding configuration
RiskAssessment
Risk assessment by different categories
SelectiveJsonExportConfig
Configuration for selective JSON export operations
SelectiveJsonExportConfigBuilder
Builder for selective JSON export configuration
SelectiveJsonExportStats
Statistics for selective JSON export operations
SelectiveJsonExporter
Selective JSON exporter with integrated optimization components
SelectiveReadOptions
Configuration options for selective reading operations
SelectiveReadOptionsBuilder
Builder for creating SelectiveReadOptions with a fluent API
SelectiveSerializationOptions
Options for selective field serialization
StreamingFieldProcessor
Streaming field processor with constant memory usage
StreamingFieldProcessorConfig
Configuration for streaming field processor
StreamingFieldProcessorConfigBuilder
Builder for streaming field processor configuration
StreamingFieldProcessorStats
Statistics for streaming field processing
StreamingJsonStats
Statistics for streaming JSON write operations
StreamingJsonWriter
Streaming JSON writer optimized for allocation data
StreamingJsonWriterConfig
Configuration for the streaming JSON writer
StreamingJsonWriterConfigBuilder
Builder for streaming JSON writer configuration
TemplateData
Template data structure for placeholder processing
TemplateResourceManager
Template resource manager for handling CSS/JS resources and placeholders
TypeInfo
Information about a specific type
UnsafeOperation
Information about an unsafe operation
VariableRelationshipAnalysis
Variable relationship analysis results for dashboard display
VariableRelationshipAnalyzer
Variable relationship analyzer

Enums§

AdvancedMetricsLevel
Advanced metrics level configuration
AllocationField
Enumeration of all possible allocation fields that can be selectively read
AllocationFilter
Filter conditions that can be applied during selective reading
AnalysisType
Analysis types that can be included/excluded
BinaryExportError
Binary export error types
DashboardFormat
Dashboard export format options
DataScope
Data scope for export
ErrorTrend
Error trend analysis
NodeCategory
Node category for visualization grouping
OptimizationLevel
Optimization levels for automatic field selection
OwnershipStatus
Ownership status of a variable
PerformanceMode
Performance mode for analysis
ProcessingStrategy
Processing strategy used for binary to HTML conversion
RecoveryStrategy
Recovery strategies
RelationshipType
Type of relationship between variables
RiskLevel
Risk level enumeration
SortField
Fields that can be used for sorting results
SortOrder
Sort order for results
TypeCategory
Type category enumeration
UnsafeOperationType
Type of unsafe operation

Traits§

PlaceholderProcessor
Trait for processing template placeholders

Functions§

create_template_data
Utility function to create template data from binary analysis results
detect_binary_type
Automatically detect binary file type and characteristics
export_binary_to_html_dashboard
Automatically choose the optimal parsing strategy based on binary type
export_to_binary
Export allocation information to binary format with default configuration
export_to_binary_with_config
Export allocation information to binary format with custom configuration
export_to_binary_with_mode
Export allocation information to binary format with enhanced header
get_recommended_config
Get recommended configuration for a specific file
parse_binary_auto
Example
parse_binary_to_html
Convert binary file to HTML format
parse_binary_to_html_auto
Auto-detect optimal conversion strategy and execute
parse_binary_to_html_direct
High-performance binary to HTML direct conversion
parse_binary_to_html_with_config
Binary to HTML conversion with custom configuration
parse_binary_to_json
Convert binary file to JSON format