Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/types/progress-tracking

lib/types/progress-tracking

Type definitions for the enhanced progress tracking system.

This module defines the structure of progress data that is stored in the database and returned via API endpoints. It provides detailed per-stage tracking with batch information, performance metrics, and time estimates.

Type Aliases

StageStatus

StageStatus = "pending" | "in_progress" | "completed" | "skipped"

Status of a processing stage.

  • pending: Stage has not started yet
  • in_progress: Stage is currently being processed
  • completed: Stage has finished successfully
  • skipped: Stage was skipped (e.g., validation passed, no geocoding needed)

StageProgress

StageProgress = object

Detailed progress information for a single processing stage.

This structure tracks all aspects of stage progress including rows processed, batch information, performance metrics, and time estimates.

Properties

status

status: StageStatus

Current status of the stage

startedAt

startedAt: Date | null

Timestamp when the stage was started (null if not started)

completedAt

completedAt: Date | null

Timestamp when the stage was completed (null if not completed)

rowsProcessed

rowsProcessed: number

Number of rows processed so far in this stage

rowsTotal

rowsTotal: number

Total number of rows to process in this stage

batchesProcessed

batchesProcessed: number

Number of batches completed so far

batchesTotal

batchesTotal: number

Total number of batches expected for this stage

currentBatchRows

currentBatchRows: number

Number of rows processed in the current batch

currentBatchTotal

currentBatchTotal: number

Total number of rows in the current batch

rowsPerSecond

rowsPerSecond: number | null

Processing rate in rows per second (null if not available)

estimatedSecondsRemaining

estimatedSecondsRemaining: number | null

Estimated seconds remaining for this stage (null if not available)


DetailedProgress

DetailedProgress = object

Complete progress information for an import job.

This structure contains per-stage progress details, overall weighted progress, and estimated completion time for the entire import job.

Properties

stages

stages: Record<string, StageProgress>

Progress information for each stage, keyed by stage name

overallPercentage

overallPercentage: number

Overall progress percentage (0-100), weighted by stage time estimates

estimatedCompletionTime

estimatedCompletionTime: Date | null

Estimated completion time for the entire import (null if not available)


BatchProgress

BatchProgress = object

Batch progress information for a specific stage.

This is a convenience type used when updating batch-specific progress.

Properties

current

current: number

Current batch number (1-indexed)

total

total: number

Total number of batches

currentBatch

currentBatch: object

Progress within the current batch

rowsProcessed

rowsProcessed: number

Rows processed in current batch

rowsTotal

rowsTotal: number

Total rows in current batch

percentage

percentage: number

Percentage complete for current batch (0-100)


PerformanceMetrics

PerformanceMetrics = object

Performance metrics for a stage.

This type contains calculated performance information that can be used to estimate time remaining and display processing rates.

Properties

rowsPerSecond

rowsPerSecond: number | null

Processing rate in rows per second

estimatedSecondsRemaining

estimatedSecondsRemaining: number | null

Estimated seconds remaining for the stage

averageBatchTimeMs

averageBatchTimeMs: number | null

Average time per batch in milliseconds

Last updated on