mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Updated timestamp fields across the codebase from `*_ts` to `*_at` for consistency and clarity. - Renamed constants for node status from "on"/"off" to "online"/"offline" to better reflect their meanings. - Enhanced validation and error handling in various components to ensure data integrity. - Refactored test cases to align with the new naming conventions and improve readability.
17 lines
818 B
Go
17 lines
818 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type TaskStat struct {
|
|
any `collection:"task_stats"`
|
|
BaseModel `bson:",inline"`
|
|
StartedAt time.Time `json:"started_at" bson:"started_at,omitempty" description:"Start time"`
|
|
EndedAt time.Time `json:"ended_at" bson:"ended_at,omitempty" description:"End time"`
|
|
WaitDuration int64 `json:"wait_duration" bson:"wait_duration,omitempty" description:"Wait duration (in millisecond)"`
|
|
RuntimeDuration int64 `json:"runtime_duration" bson:"runtime_duration,omitempty" description:"Runtime duration (in millisecond)"`
|
|
TotalDuration int64 `json:"total_duration" bson:"total_duration,omitempty" description:"Total duration (in millisecond)"`
|
|
ResultCount int64 `json:"result_count" bson:"result_count" description:"Result count"`
|
|
}
|