fn test_cpu_time_percent()

in src/bpf_program.rs [220:236]


    fn test_cpu_time_percent() {
        let prog = BpfProgram {
            id: 1,
            bpf_type: "test".to_string(),
            name: "test".to_string(),
            prev_runtime_ns: 100_000_000,
            run_time_ns: 200_000_000,
            prev_run_cnt: 0,
            run_cnt: 2,
            instant: Instant::now(),
            period_ns: 1_000_000_000,
            processes: vec![],
        };
        // Calculate expected value: (200_000_000 - 100_000_000) / 1_000_000_000 * 100 = 10.0
        let expected = 10.0;
        assert_eq!(prog.cpu_time_percent(), expected);
    }