repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/update/update_flags.rs | tests/update/update_flags.rs | #![cfg(test)]
#![cfg(not(target_os = "windows"))]
//! Tests for the `-u` and `--update` commandline flags.
//!
//! These tests verify that the update flags are parsed correctly and simulate
//! a long-running update scenario where sudo may timeout and require password re-entry.
use std::fs;
use std::fs::File;
use std:... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/update/system_update_ui.rs | tests/update/system_update_ui.rs | //! UI tests for system update modal.
//!
//! Tests cover:
//! - `SystemUpdate` modal structure
//! - Update options state
//!
//! Note: These tests verify modal state structure rather than actual rendering.
#![cfg(test)]
use pacsea::state::{AppState, Modal};
#[test]
/// What: Test `SystemUpdate` modal structure.
//... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/update/system_update_integration.rs | tests/update/system_update_integration.rs | //! Integration tests for the system update process.
//!
//! Tests cover:
//! - System update modal state
//! - Update command building
//! - Different update options (mirrors, pacman, AUR, cache)
//! - `ExecutorRequest::Update` creation
//! - Password prompt for sudo commands
//! - Full update sequence
#![cfg(test)]
... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/update/update_single_integration.rs | tests/update/update_single_integration.rs | //! Integration tests for single package update process.
//!
//! Tests cover:
//! - Updates modal handling
//! - Single package update flow
//! - Preflight modal for updates
//!
//! Note: These tests verify the update flow structure.
#![cfg(test)]
use pacsea::state::{AppState, Modal, PackageItem, Source};
/// What: ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/update/mod.rs | tests/update/mod.rs | //! Integration and UI tests for update operations.
mod system_update_integration;
mod system_update_ui;
mod update_flags;
mod update_single_integration;
| rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/remove/remove_integration.rs | tests/remove/remove_integration.rs | //! Integration tests for the remove process.
//!
//! Tests cover:
//! - Full remove flow from user action to execution
//! - Cascade mode handling
//! - Preflight modal for remove
//! - Executor request handling
//!
//! Note: These tests are expected to fail initially as remove currently spawns terminals.
#![cfg(test... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/remove/mod.rs | tests/remove/mod.rs | //! Integration and UI tests for remove operations.
mod remove_integration;
mod remove_ui;
| rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/remove/remove_ui.rs | tests/remove/remove_ui.rs | //! UI tests for remove process modals.
//!
//! Tests cover:
//! - Remove modal rendering structure
//! - `PreflightExec` modal for remove
//! - `ConfirmRemove` modal structure
//!
//! Note: These tests verify modal state structure rather than actual rendering.
#![cfg(test)]
// CascadeMode is imported but not used in... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/downgrade/mod.rs | tests/downgrade/mod.rs | //! Integration and UI tests for downgrade operations.
mod downgrade_integration;
mod downgrade_ui;
| rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/downgrade/downgrade_integration.rs | tests/downgrade/downgrade_integration.rs | //! Integration tests for the downgrade process.
//!
//! Tests cover:
//! - Downgrade list management
//! - Downgrade command execution
//! - Navigation in downgrade pane
//! - `ExecutorRequest::Downgrade` creation
//! - Password prompt for downgrade
//! - Dry-run mode
#![cfg(test)]
use pacsea::install::ExecutorReque... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/downgrade/downgrade_ui.rs | tests/downgrade/downgrade_ui.rs | //! UI tests for downgrade process.
//!
//! Tests cover:
//! - Downgrade list state structure
//! - Downgrade pane focus state
//!
//! Note: These tests verify state structure rather than actual rendering.
#![cfg(test)]
use pacsea::state::{AppState, PackageItem, RightPaneFocus, Source};
/// What: Create a test packa... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/network_error.rs | tests/other/network_error.rs | //! Integration tests for network error handling.
//!
//! Tests cover:
//! - `ExecutorOutput::Error` handling for network failures during install
//! - Error display in `PreflightExec` modal when network fails
//! - Error recovery and UI state after network failure
//! - Network failure during system update
//! - Netwo... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/ui_integration.rs | tests/other/ui_integration.rs | //! Integration tests for UI rendering using ratatui's `TestBackend`.
//!
//! These tests verify that the TUI renders correctly across different application states
//! without requiring a real terminal. They focus on visual rendering correctness rather
//! than business logic.
use ratatui::{Terminal, backend::TestBack... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | true |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/edge_cases.rs | tests/other/edge_cases.rs | //! Integration tests for edge cases.
//!
//! Tests cover:
//! - Empty package list for all operations
//! - Special characters in package names (quoting)
//! - Very long package names
//! - Concurrent operation prevention
#![cfg(test)]
use pacsea::install::ExecutorRequest;
use pacsea::state::{AppState, Modal, Packag... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/conflict_preservation.rs | tests/other/conflict_preservation.rs | //! Integration test for conflict preservation when packages are added sequentially.
use pacsea as crate_root;
// Helper functions (simplified versions for this test)
fn create_test_package(
name: impl Into<String>,
version: impl Into<String>,
source: crate_root::state::Source,
) -> crate_root::state::Pac... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/data_flow_complexity.rs | tests/other/data_flow_complexity.rs | //! Data flow complexity calculation test for the Pacsea project.
//!
//! This test analyzes all Rust source files in the project and calculates
//! data flow complexity metrics for functions and methods according to Dunsmore.
//!
//! Data flow complexity measures the complexity of data flow through a program by:
//! -... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/runtime_smoke.rs | tests/other/runtime_smoke.rs | #![cfg(test)]
//! End-to-end runtime smoke test (headless)
//!
//! Tests cover:
//! - Application initialization without panicking
//! - Headless mode operation with `PACSEA_TEST_HEADLESS=1`
//! - Task cancellation handling
use std::io::Write;
use std::time::Duration;
#[tokio::test]
/// What: Test end-to-end runtime ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/mod.rs | tests/other/mod.rs | //! Miscellaneous tests (complexity, smoke tests, etc.).
mod conflict_preservation;
mod custom_command;
mod cyclomatic_complexity;
mod data_flow_complexity;
mod dry_run_mode;
mod edge_cases;
mod loading_modal;
mod network_error;
mod runtime_smoke;
mod terminals_args_shape;
mod ui_integration;
| rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/custom_command.rs | tests/other/custom_command.rs | //! Integration tests for custom command handler.
//!
//! Tests cover:
//! - `ExecutorRequest::CustomCommand` creation
//! - Command with sudo password
//! - Command without sudo
//! - Dry-run command format
#![cfg(test)]
use pacsea::install::ExecutorRequest;
use pacsea::state::{AppState, Modal, PreflightAction, Pref... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/dry_run_mode.rs | tests/other/dry_run_mode.rs | //! Consolidated integration tests for dry-run mode.
//!
//! Tests cover:
//! - Install dry-run respects flag
//! - Remove dry-run respects flag
//! - Update dry-run respects flag
//! - Scan dry-run respects flag
//! - Custom command dry-run respects flag
//! - "DRY RUN:" prefix in commands
#![cfg(test)]
use pacsea::... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/cyclomatic_complexity.rs | tests/other/cyclomatic_complexity.rs | //! Cyclomatic complexity calculation test for the Pacsea project.
//!
//! This test analyzes all Rust source files in the project and calculates
//! cyclomatic complexity metrics for functions and methods.
//!
//! Cyclomatic complexity measures the number of linearly independent paths
//! through a program's source co... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/loading_modal.rs | tests/other/loading_modal.rs | //! Integration tests for loading modal.
//!
//! Tests cover:
//! - Loading modal state creation
//! - Modal transition from Loading to result modal
//! - Loading message display
#![cfg(test)]
use pacsea::state::{AppState, Modal};
#[test]
/// What: Test Loading modal state creation.
///
/// Inputs:
/// - Loading mes... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/other/terminals_args_shape.rs | tests/other/terminals_args_shape.rs | #![cfg(not(target_os = "windows"))]
use crossterm::event::{
Event as CEvent, KeyCode, KeyEvent, KeyModifiers, MouseButton, MouseEvent, MouseEventKind,
};
use pacsea as crate_root;
fn write_fake(term_name: &str, dir: &std::path::Path) -> (std::path::PathBuf, std::path::PathBuf) {
use std::os::unix::fs::Permiss... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/install_integration.rs | tests/install/install_integration.rs | //! Integration tests for the install process.
//!
//! Tests cover:
//! - Full install flow from Enter key to `PreflightExec` modal
//! - Skip preflight flow
//! - Password prompt flow
//! - Executor request handling
//! - Modal transitions
#![cfg(test)]
use pacsea::install::{ExecutorOutput, ExecutorRequest};
use pac... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/install_ui.rs | tests/install/install_ui.rs | //! UI tests for install process modals.
//!
//! Tests cover:
//! - `PreflightExec` modal state structure
//! - Preflight modal state structure
//! - Modal state transitions
#![cfg(test)]
use pacsea::state::{
Modal, PackageItem, PreflightAction, PreflightTab, Source, modal::PreflightHeaderChips,
};
/// What: Cre... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/password_prompt.rs | tests/install/password_prompt.rs | //! Integration tests for password prompt modal.
//!
//! Tests cover:
//! - Password prompt for each `PasswordPurpose` variant
//! - Incorrect password retry with error message
//! - Password prompt cancellation
//! - Password masking verification
//! - Password state transitions
#![cfg(test)]
use pacsea::state::{
... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/reinstall_confirmation.rs | tests/install/reinstall_confirmation.rs | //! Integration tests for reinstall confirmation modal.
//!
//! Tests cover:
//! - Single package reinstall confirmation
//! - Batch reinstall with mixed installed/new packages
//! - Direct install reinstall flow
//! - Cancel reinstall returns to previous state
//! - Header chips in reinstall confirmation
#![cfg(test)... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/executor_output.rs | tests/install/executor_output.rs | //! Integration tests for executor output streaming.
//!
//! Tests cover:
//! - `ExecutorOutput::Line` message generation
//! - `ExecutorOutput::ReplaceLastLine` for progress bars
//! - `ExecutorOutput::Finished` with success/failure states
//! - `ExecutorOutput::Error` handling
//! - Large output handling in Preflight... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/optional_deps_integration.rs | tests/install/optional_deps_integration.rs | //! Integration tests for optional dependencies installation and setup.
//!
//! Tests cover:
//! - `OptionalDeps` modal state
//! - Optional dependency installation
//! - Setup flows (virustotal, aur-sleuth)
//!
//! Note: These tests are expected to fail initially as optional deps installation currently spawns terminal... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/mod.rs | tests/install/mod.rs | //! Integration and UI tests for install operations.
mod direct_install_integration;
mod direct_install_ui;
mod executor_output;
mod install_integration;
mod install_ui;
mod optional_deps_integration;
mod optional_deps_ui;
mod password_prompt;
mod reinstall_confirmation;
| rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/direct_install_integration.rs | tests/install/direct_install_integration.rs | //! Integration tests for direct install/remove operations (bypassing preflight).
//!
//! Tests cover:
//! - Direct install flow for single package
//! - Direct install flow for multiple packages
//! - Direct remove flow
//! - Password prompt handling
//! - Executor request handling
//! - Reinstall/batch update confirm... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/direct_install_ui.rs | tests/install/direct_install_ui.rs | //! UI tests for direct install/remove modals.
//!
//! Tests cover:
//! - ``PasswordPrompt`` modal structure for direct install/remove
//! - ``PreflightExec`` modal structure for direct operations
//! - Modal state transitions
#![cfg(test)]
use pacsea::state::{
AppState, Modal, PackageItem, PreflightAction, Prefl... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/install/optional_deps_ui.rs | tests/install/optional_deps_ui.rs | //! UI tests for optional dependencies modal.
//!
//! Tests cover:
//! - `OptionalDeps` modal structure
//! - Optional dependency row structure
//!
//! Note: These tests verify modal state structure rather than actual rendering.
#![cfg(test)]
use pacsea::state::{AppState, Modal, types::OptionalDepRow};
/// What: Cre... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/data_arrival.rs | tests/preflight_integration/data_arrival.rs | //! Tests for out-of-order data arrival and cancellation handling.
use pacsea as crate_root;
use tokio::sync::mpsc;
/// What: Creates test packages for testing.
///
/// Inputs: None (uses hardcoded test data).
///
/// Output:
/// - Vector of `PackageItem` instances for testing
///
/// Details:
/// - Creates two packa... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/edge_cases.rs | tests/preflight_integration/edge_cases.rs | //! //! Tests for edge cases.
use pacsea as crate_root;
/// What: Switch to Deps tab and sync empty dependencies.
///
/// Inputs:
/// - `app`: Application state with modal
///
/// Output:
/// - Updates modal to Deps tab with empty dependency info
///
/// Details:
/// - Simulates `sync_dependencies` logic for empty re... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/package_operations.rs | tests/preflight_integration/package_operations.rs | //! //! Tests for package operations and management.
use pacsea as crate_root;
/// Sets up first package with cached dependencies, files, and services.
///
/// What: Creates a first package and pre-populates app state with its cached data
/// including dependencies, files, and services to simulate a package that was ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | true |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/tab_switching.rs | tests/preflight_integration/tab_switching.rs | //! Tests for tab switching behavior.
use super::helpers;
use pacsea as crate_root;
/// What: Create test packages for mixed completion state testing.
///
/// Inputs:
/// - None (uses hardcoded test data)
///
/// Output:
/// - Vector of test packages (one official, one AUR)
///
/// Details:
/// - Creates two test pac... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/tab_variations.rs | tests/preflight_integration/tab_variations.rs | //! //! Tests for tab switching variations.
use super::helpers::*;
use pacsea as crate_root;
#[test]
/// What: Verify that preflight modal loads data correctly regardless of tab switching order.
///
/// Inputs:
/// - Packages in `install_list` with all data cached
/// - User switches tabs in different orders (e.g., S... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/caching.rs | tests/preflight_integration/caching.rs | //! Tests for cached data loading.
use pacsea as crate_root;
/// Helper: Create test packages for the test
fn create_test_packages() -> Vec<crate_root::state::PackageItem> {
vec![
crate_root::state::PackageItem {
name: "test-package-1".to_string(),
version: "1.0.0".to_string(),
... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/helpers.rs | tests/preflight_integration/helpers.rs | //! Helper functions for preflight integration tests.
use pacsea as crate_root;
use std::collections::HashMap;
/// What: Merge dependencies with the same name into a single entry.
///
/// Inputs:
/// - `deps`: Vector of dependencies that may contain duplicates
///
/// Output:
/// - Vector of merged dependencies (one ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/skip_preflight.rs | tests/preflight_integration/skip_preflight.rs | //! Tests for `skip_preflight` setting functionality.
//!
//! Tests cover:
//! - Preflight modal is opened when `skip_preflight` = false (default)
//! - `open_preflight_modal` function is callable and handles packages correctly
use pacsea as crate_root;
/// What: Test that `open_preflight_modal` is callable and doesn... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/persistence.rs | tests/preflight_integration/persistence.rs | //! //! Tests for persistence across tabs.
use pacsea as crate_root;
/// Helper: Create test packages for service restart decision tests.
///
/// Output:
/// - Vector of test `PackageItem` instances
fn create_test_packages() -> Vec<crate_root::state::PackageItem> {
vec![
crate_root::state::PackageItem {
... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | true |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/cache_sync.rs | tests/preflight_integration/cache_sync.rs | //! Tests for cache synchronization.
use pacsea as crate_root;
/// Creates a test package item.
///
/// Inputs:
/// - `name`: Package name
/// - `version`: Package version
///
/// Output:
/// - A `PackageItem` with the specified name and version
///
/// Details:
/// - Creates a package with default values for other f... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/conflicts.rs | tests/preflight_integration/conflicts.rs | //! //! Tests for conflict resolution.
use super::helpers::*;
use pacsea as crate_root;
/// What: Create test dependencies including conflicts.
///
/// Output:
/// - Returns vector of dependency info with conflicts
///
/// Details:
/// - Creates dependencies for package-1, package-2, and aur-package
/// - Includes a ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | true |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/mod.rs | tests/preflight_integration/mod.rs | //! Integration tests for preflight modal optimization features.
//!
//! Tests cover:
//! - Out-of-order data arrival (stages completing in different orders)
//! - Cancellation support (aborting work when modal closes)
//! - Caching and data synchronization
//! - Package operations and management
//! - Tab switching an... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/aur_mix.rs | tests/preflight_integration/aur_mix.rs | //! Tests for AUR and official package mixing.
use pacsea as crate_root;
/// What: Create test packages (official and AUR) for testing.
///
/// Inputs: None
///
/// Output:
/// - Vector containing one official and one AUR test package
///
/// Details:
/// - Creates minimal test packages with different sources
fn crea... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/auto_scroll.rs | tests/preflight_integration/auto_scroll.rs | //! Integration tests for auto-scrolling logs in `PreflightExec` modal.
//!
//! Tests cover:
//! - `PreflightExec` modal `log_lines` append behavior
//! - Log panel state after multiple line additions
//! - Progress bar line replacement in `log_lines`
#![cfg(test)]
use pacsea::state::{
AppState, Modal, PackageIte... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/remove_operations.rs | tests/preflight_integration/remove_operations.rs | //! //! Tests for remove operations.
use super::helpers;
use pacsea as crate_root;
/// What: Create test reverse dependencies for remove operations.
///
/// Inputs:
/// - None
///
/// Output:
/// - Vector of `DependencyInfo` representing reverse dependencies
///
/// Details:
/// - Creates two test reverse dependencie... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/error_handling.rs | tests/preflight_integration/error_handling.rs | //! Tests for error handling and partial failures.
use pacsea as crate_root;
/// What: Set up test app state with pre-populated cache data.
///
/// Inputs:
/// - None (uses hardcoded test data)
///
/// Output:
/// - `AppState` with test packages, dependencies, files, and services error
///
/// Details:
/// - Creates ... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/risk_calculation.rs | tests/preflight_integration/risk_calculation.rs | //! Integration tests for enhanced preflight risk calculation.
//!
//! Tests cover:
//! - Risk score calculation with dependents (+2 per dependent)
//! - Risk level thresholds (Low/Medium/High)
//! - Header chips update with risk info
//! - Multiple dependents accumulation
#![cfg(test)]
use pacsea::state::{
AppSt... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
Firstp1ck/Pacsea | https://github.com/Firstp1ck/Pacsea/blob/c433ad6a837b7985d8b99ba9afd8f07a93d046f4/tests/preflight_integration/large_datasets.rs | tests/preflight_integration/large_datasets.rs | //! Tests for large datasets handling.
use super::helpers::*;
use pacsea as crate_root;
/// What: Create a large set of test packages (mix of official and AUR).
///
/// Inputs:
/// - None
///
/// Output:
/// - Vector of 12 test packages (8 official, 4 AUR)
///
/// Details:
/// - Creates packages with varying properti... | rust | MIT | c433ad6a837b7985d8b99ba9afd8f07a93d046f4 | 2026-01-04T20:14:32.225407Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/lib.rs | crates/paimon/src/lib.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/error.rs | crates/paimon/src/error.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/file_index/file_index_format.rs | crates/paimon/src/file_index/file_index_format.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/file_index/mod.rs | crates/paimon/src/file_index/mod.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/stats.rs | crates/paimon/src/spec/stats.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/objects_file.rs | crates/paimon/src/spec/objects_file.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/manifest_entry.rs | crates/paimon/src/spec/manifest_entry.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/manifest_file_meta.rs | crates/paimon/src/spec/manifest_file_meta.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/index_manifest.rs | crates/paimon/src/spec/index_manifest.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/types.rs | crates/paimon/src/spec/types.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | true |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/schema.rs | crates/paimon/src/spec/schema.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/mod.rs | crates/paimon/src/spec/mod.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/index_file_meta.rs | crates/paimon/src/spec/index_file_meta.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/snapshot.rs | crates/paimon/src/spec/snapshot.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/data_file.rs | crates/paimon/src/spec/data_file.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/manifest_common.rs | crates/paimon/src/spec/manifest_common.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/spec/schema_change.rs | crates/paimon/src/spec/schema_change.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/io/storage_memory.rs | crates/paimon/src/io/storage_memory.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/io/file_io.rs | crates/paimon/src/io/file_io.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/io/storage.rs | crates/paimon/src/io/storage.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/io/mod.rs | crates/paimon/src/io/mod.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
apache/paimon-rust | https://github.com/apache/paimon-rust/blob/1f69c4a6c24f5f7fa858cad57be81fc135c1da71/crates/paimon/src/io/storage_fs.rs | crates/paimon/src/io/storage_fs.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | rust | Apache-2.0 | 1f69c4a6c24f5f7fa858cad57be81fc135c1da71 | 2026-01-04T20:18:00.429093Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/result_recorder.rs | src/result_recorder.rs | use ahash::AHashMap;
use crossbeam_channel::{Receiver, Sender};
use indoc::formatdoc;
use std::fmt::Write;
use std::thread::JoinHandle;
use std::{mem, thread};
use crate::parser::gc_record::{FieldType, GcRecord};
use crate::parser::record::Record::{
AllocationSites, ControlSettings, CpuSamples, EndThread, GcSegmen... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/errors.rs | src/errors.rs | use std::any::Any;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum HprofSlurpError {
#[error("input file `{name:?}` not found")]
InputFileNotFound { name: String },
#[error("invalid argument `top` - the value should be strictly positive")]
InvalidTopPositiveInt,
#[error("invalid pointer size... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/rendered_result.rs | src/rendered_result.rs | use std::{fmt::Write, fs::File, io::BufWriter};
use chrono::Utc;
use serde::Serialize;
use crate::{errors::HprofSlurpError, utils::pretty_bytes_size};
#[derive(Serialize, Clone)]
pub struct ClassAllocationStats {
pub class_name: String,
pub instance_count: u64,
pub largest_allocation_bytes: u64,
pub ... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/args.rs | src/args.rs | use crate::errors::HprofSlurpError;
use crate::errors::HprofSlurpError::{InputFileNotFound, InvalidTopPositiveInt};
use clap::{Arg, Command};
use clap::{crate_authors, crate_description, crate_name, crate_version};
use std::path::Path;
fn command() -> Command {
Command::new(crate_name!())
.version(crate_ve... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/utils.rs | src/utils.rs | const KILOBYTE: f64 = 1024.0;
const MEGABYTE: f64 = KILOBYTE * KILOBYTE;
const GIGABYTE: f64 = KILOBYTE * MEGABYTE;
pub fn pretty_bytes_size(len: u64) -> String {
let float_len = len as f64;
let (unit, value) = if float_len > GIGABYTE {
("GiB", float_len / GIGABYTE)
} else if float_len > MEGABYTE {... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/main.rs | src/main.rs | mod args;
mod errors;
mod parser;
mod prefetch_reader;
mod rendered_result;
mod result_recorder;
mod slurp;
mod utils;
use std::time::Instant;
use rendered_result::JsonResult;
use crate::args::Args;
use crate::args::get_args;
use crate::errors::HprofSlurpError;
use crate::slurp::slurp_file;
fn main() {
std::pro... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/prefetch_reader.rs | src/prefetch_reader.rs | use crossbeam_channel::{Receiver, Sender};
use std::fs::File;
use std::io::{BufReader, Read};
use std::thread;
use std::thread::JoinHandle;
pub struct PrefetchReader {
reader: BufReader<File>,
file_len: usize,
processed_len: usize,
read_size: usize,
}
impl PrefetchReader {
pub const fn new(
... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/slurp.rs | src/slurp.rs | use std::fs::File;
use std::io::{BufReader, Read};
use indicatif::{ProgressBar, ProgressStyle};
use crossbeam_channel::{Receiver, Sender};
use crate::errors::HprofSlurpError;
use crate::errors::HprofSlurpError::{
InvalidHeaderSize, InvalidHprofFile, InvalidIdSize, StdThreadError, UnsupportedIdSize,
};
use crate:... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/primitive_parsers.rs | src/parser/primitive_parsers.rs | use nom::Parser;
use nom::sequence::terminated;
use nom::{IResult, bytes, number};
pub fn parse_c_string(i: &[u8]) -> IResult<&[u8], &[u8]> {
terminated(
bytes::streaming::take_until("\0"),
bytes::streaming::tag("\0"),
)
.parse(i)
}
pub fn parse_i8(i: &[u8]) -> IResult<&[u8], i8> {
num... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/record_parser.rs | src/parser/record_parser.rs | extern crate nom;
use crate::parser::gc_record::{
ArrayValue, ClassDumpFields, ConstFieldInfo, FieldInfo, FieldType, FieldValue, GcRecord,
};
use crate::parser::primitive_parsers::{
parse_f32, parse_f64, parse_i8, parse_i16, parse_i32, parse_i64, parse_u8, parse_u16,
parse_u32, parse_u64,
};
use crate::par... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/record.rs | src/parser/record.rs | use crate::parser::gc_record::GcRecord;
#[derive(Debug, PartialEq, Eq)]
pub struct RecordHeader {
pub timestamp: u32,
pub length: u32,
}
#[derive(Debug)]
pub struct AllocationSite {
pub is_array: u8,
pub class_serial_number: u32,
pub stack_trace_serial_number: u32,
pub bytes_alive: u32,
pu... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/mod.rs | src/parser/mod.rs | pub mod file_header_parser;
#[allow(dead_code)]
pub mod gc_record;
mod primitive_parsers;
#[allow(dead_code)]
pub mod record;
pub mod record_parser;
pub mod record_stream_parser;
| rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/file_header_parser.rs | src/parser/file_header_parser.rs | use crate::parser::primitive_parsers::{parse_c_string, parse_u32, parse_u64};
use nom::IResult;
use nom::Parser;
use nom::combinator::map;
#[derive(Debug, PartialEq, Eq)]
pub struct FileHeader {
pub format: String,
pub size_pointers: u32,
pub timestamp: u64,
}
impl FileHeader {
fn from_bytes(format_b:... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/gc_record.rs | src/parser/gc_record.rs | #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum FieldType {
Object = 2,
Bool = 4,
Char = 5,
Float = 6,
Double = 7,
Byte = 8,
Short = 9,
Int = 10,
Long = 11,
}
impl FieldType {
pub fn from_value(v: i8) -> Self {
match v {
2 => Self::Object,
... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
agourlay/hprof-slurp | https://github.com/agourlay/hprof-slurp/blob/7f07e9f13af1583e7780937e5c2a2bb547a80808/src/parser/record_stream_parser.rs | src/parser/record_stream_parser.rs | use crate::parser::record::Record;
use crate::parser::record_parser::HprofRecordParser;
use nom::Err;
use nom::Needed::Size;
use nom::Needed::Unknown;
use crate::slurp::READ_BUFFER_SIZE;
use crossbeam_channel::{Receiver, Sender};
use std::thread;
use std::thread::JoinHandle;
pub struct HprofRecordStreamParser {
... | rust | Apache-2.0 | 7f07e9f13af1583e7780937e5c2a2bb547a80808 | 2026-01-04T20:18:02.056003Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/headers.rs | tpnote-html2md/src/headers.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::{Handle, NodeData};
#[derive(Default)]
pub struct HeaderHandler {
header_type: String,
}
impl TagHandler for HeaderHandler {
fn handle(&mut self, tag: &Handle, printer: &mut StructuredPrinter) {
... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/lib.rs | tpnote-html2md/src/lib.rs | use std::boxed::Box;
use std::collections::HashMap;
use std::sync::LazyLock;
use std::ffi::{CStr, CString};
use std::os::raw::c_char;
use regex::Regex;
use html5ever::driver::ParseOpts;
use html5ever::parse_document;
use html5ever::tendril::TendrilSink;
pub use markup5ever_rcdom::{Handle, NodeData, RcDom};
pub mod... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/anchors.rs | tpnote-html2md/src/anchors.rs | use crate::common::get_tag_attr;
use crate::dummy::IdentityHandler;
use crate::markup5ever_rcdom;
use percent_encoding::percent_decode_str;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::{Handle, NodeData};
#[derive(Default)]
pub struct AnchorHandler {
start_pos: usize,
url: Stri... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/styles.rs | tpnote-html2md/src/styles.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::{Handle, NodeData};
#[derive(Default)]
pub struct StyleHandler {
start_pos: usize,
style_type: String,
}
/// Applies givem `mark` at both start and end indices, updates printer position to the end of te... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/markup5ever_rcdom.rs | tpnote-html2md/src/markup5ever_rcdom.rs | // This file is part of commit 8415d50 and a copy of:
// [html5ever/rcdom/lib.rs at main · servo/html5ever · GitHub](https://github.com/servo/html5ever/blob/main/rcdom/lib.rs)
//
// See also:
// [`RcDom` issues in `html2html` example · Issue #555 · servo/html5ever](https://github.com/servo/html5ever/issues/555)
//
//
/... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/quotes.rs | tpnote-html2md/src/quotes.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::Handle;
#[derive(Default)]
pub struct QuoteHandler {
start_pos: usize,
}
impl TagHandler for QuoteHandler {
fn handle(&mut self, _tag: &Handle, printer: &mut StructuredPrinter) {
self.start_pos ... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/iframes.rs | tpnote-html2md/src/iframes.rs | use std::sync::LazyLock;
use super::StructuredPrinter;
use super::TagHandler;
use crate::common::get_tag_attr;
use crate::dummy::IdentityHandler;
use crate::markup5ever_rcdom;
use markup5ever_rcdom::Handle;
use regex::Regex;
/// Pattern that detects iframes with Youtube embedded videos<br/>
/// Examples:
/// * `htt... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/lists.rs | tpnote-html2md/src/lists.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::Handle;
/// gets all list elements registered by a `StructuredPrinter` in reverse order
fn list_hierarchy(printer: &mut StructuredPrinter) -> Vec<&String> {
printer
.parent_chain
.iter()
... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/codes.rs | tpnote-html2md/src/codes.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use markup5ever_rcdom::{Handle, NodeData};
#[derive(Default)]
pub struct CodeHandler {
code_type: String,
}
impl CodeHandler {
/// Used in both starting and finishing handling
fn do_handle(&mut self, printer: &mut Structu... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/dummy.rs | tpnote-html2md/src/dummy.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use html5ever::serialize;
use html5ever::serialize::{SerializeOpts, TraversalScope};
use markup5ever_rcdom::{Handle, NodeData, SerializableHandle};
#[derive(Default)]
pub struct DummyHandler;
impl TagHandler for DummyHandler {
fn ... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/common.rs | tpnote-html2md/src/common.rs | use crate::markup5ever_rcdom;
use markup5ever_rcdom::{Handle, NodeData};
pub fn get_tag_attr(tag: &Handle, attr_name: &str) -> Option<String> {
match tag.data {
NodeData::Element { ref attrs, .. } => {
let attrs = attrs.borrow();
let requested_attr = attrs
.iter()
... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
getreu/tp-note | https://github.com/getreu/tp-note/blob/4a373fcf860c8d7a8c3da02f4ab23441f91738ae/tpnote-html2md/src/tables.rs | tpnote-html2md/src/tables.rs | use crate::markup5ever_rcdom;
use super::StructuredPrinter;
use super::TagHandler;
use super::{clean_markdown, walk};
use std::{cmp, collections::HashMap};
use markup5ever_rcdom::{Handle, NodeData};
#[derive(Default)]
pub struct TableHandler;
impl TagHandler for TableHandler {
fn handle(&mut self, tag: &Handle... | rust | Apache-2.0 | 4a373fcf860c8d7a8c3da02f4ab23441f91738ae | 2026-01-04T20:18:01.333543Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.