[example] Fix compilation errors - use segment_ratio