当前位置:首页>自动驾驶>自动驾驶中的C++:如何用Modern C++保证核心算法的实时性和安全性?

自动驾驶中的C++:如何用Modern C++保证核心算法的实时性和安全性?

  • 2026-04-25 11:59:47
自动驾驶中的C++:如何用Modern C++保证核心算法的实时性和安全性?

自动驾驶技术的演进将软件工程推向了极致挑战。在以60公里时速行驶的车辆上,每毫秒的延迟都可能意味着3米的盲进距离——足以在突发状况下决定生死。在这场与时间的赛跑中,现代C++凭借其零成本抽象、constexpr编译期计算和RAII资源管理等核心特性,成为了构建高可靠自动驾驶系统的技术基石。

最近上线了一套【AI Coding实战课程】,把用AI做开发的整套方法都拆开讲清楚了,如果你也在用AI写代码,但感觉用不顺,想系统提升AI编程能力,可以看下方海报了解详情👇

零成本抽象:高级表达与极致性能的完美平衡

零成本抽象是现代C++的核心理念,也是其在自动驾驶领域备受推崇的根本原因。这一原则的精髓在于:开发者可以使用模板、泛型、内联函数等高级特性编写清晰、可维护的代码,而编译器会将其优化为与手写汇编代码等效的高效机器码。

在路径规划模块中,这种能力尤为重要。传统的实现往往需要在代码可读性和执行效率之间做出妥协,而现代C++通过模板元编程消除了这种两难选择。

template<typename PointT>classPathOptimizer {public:autooptimize(conststd::vector<PointT>& waypoints) -> decltype(auto{static_assert(has_coordinate_v<PointT>, "PointT must have x, y coordinates");return perform_optimization(waypoints);    }private:autoperform_optimization(conststd::vector<PointT>& waypoints) -> decltype(auto{std::vector<float> smoothed;        smoothed.reserve(waypoints.size());for (constauto& wp : waypoints) {            smoothed.push_back(calculate_smoothness(wp));        }return smoothed;    }template<typename T>autocalculate_smoothness(const T& point) -> float{ifconstexpr(has_curvature_v<T>){return point.curvature;        } else {return1.0f / (1.0f + point.curvature);        }    }};

这种基于模板的静态多态避免了运行时的虚函数调用开销。编译器会为每种点类型生成专门的优化代码,实际生成的机器码与手写版本几乎完全一致。在实际测试中,相比使用虚函数的动态多态,调用开销可以降低至几乎为零。

代码优化过程

在传感器数据处理中,零成本抽象的价值同样显著。通过使用constexpr if和concepts,我们可以在编译期根据不同的传感器类型选择最优的处理路径,避免运行时的分支判断:

template<typename SensorDataT>concept HasIntensity = requires(SensorDataT data) {    data.intensity;};template<typename SensorDataT>concept HasRGB = requires(SensorDataT data) {    data.r;    data.g;    data.b;};template<typename SensorDataT>classPreprocessor {public:autoprocess(const SensorDataT& data) -> auto{ifconstexpr(HasIntensity<SensorDataT>){return filter_by_intensity(data);        } elseifconstexpr (HasRGB<SensorDataT>) {return filter_by_color(data);        } else {return apply_default_filter(data);        }    }};

constexpr:编译期计算的威力

constexpr是现代C++中最强大的优化工具之一,它允许函数和变量在编译期进行计算。在自动驾驶系统中,这意味着我们可以将大量的配置计算、查表生成等工作前置到编译阶段,从而完全消除运行时开销。

一个典型的应用场景是路径规划中的代价函数预计算。在传统的实现中,这些计算往往在程序启动时进行,不仅增加了启动延迟,还可能因为运行时错误导致系统初始化失败。使用constexpr后,我们可以在编译期就完成所有计算:

constexprsize_t GRID_SIZE = 100;constexprautogenerate_cost_table(){std::array<std::array<float, GRID_SIZE>, GRID_SIZE> cost_table{};for (size_t i = 0; i < GRID_SIZE; ++i) {for (size_t j = 0; j < GRID_SIZE; ++j) {float distance = static_cast<float>(std::hypot(i, j));            cost_table[i][j] = distance * distance;  // 平方距离        }    }return cost_table;}constexprauto path_cost_table = generate_cost_table();

这段代码在编译期就生成了100x100的代价表,运行时只需要查表即可获取任意两点间的代价。在实际应用中,这种技术可以将路径规划的初始化时间从数十毫秒降低至几乎为零。

在传感器融合中,constexpr同样发挥着重要作用。时间戳对齐是传感器融合的基础,我们需要在不同频率的传感器数据流中找到时间上最接近的匹配。通过constexpr,我们可以预先计算时间戳的查找表:

constexprsize_t MAX_TIME_DIFF_MS = 100;constexprautobuild_timestamp_lookup(){std::array<float, MAX_TIME_DIFF_MS + 1> lookup{};for (size_t i = 0; i <= MAX_TIME_DIFF_MS; ++i) {float time_diff_sec = static_cast<float>(i) / 1000.0f;        lookup[i] = time_diff_sec * time_diff_sec;  // 平方惩罚    }return lookup;}constexprauto timestamp_penalty_table = build_timestamp_lookup();inlineboolis_timestamp_match(double t1, double t2, double threshold_sec = 0.1){double diff = std::abs(t1 - t2);int diff_ms = static_cast<int>(diff * 1000.0);if (diff_ms <= MAX_TIME_DIFF_MS) {float penalty = timestamp_penalty_table[diff_ms];return penalty < threshold_sec * threshold_sec;    }returnfalse;}

这种编译期计算不仅消除了运行时开销,更重要的是提高了系统的确定性——因为所有计算都在编译期完成,运行时的行为完全可预测,这对于实时系统来说至关重要。

RAII:资源管理的安全网

RAII(Resource Acquisition Is Initialization,资源获取即初始化)是C++中最强大的资源管理机制,也是保证自动驾驶系统安全性的关键技术。在自动驾驶领域,资源泄漏不仅仅是内存泄漏那么简单,还可能包括文件句柄、网络连接、硬件设备访问等,任何资源的泄漏都可能导致系统失效甚至安全事故。

RAII资源管理

RAII的核心思想是将资源的生命周期与对象的生命周期绑定:在对象构造时获取资源,在对象析构时释放资源。这种机制保证了即使在发生异常的情况下,资源也能被正确释放。

在传感器驱动的封装中,RAII的应用尤为关键:

classSensorDriver {private:int device_fd;std::unique_ptr<uint8_t[]> data_buffer;size_t buffer_size;std::mutex access_mutex;public:explicitSensorDriver(constchar* device_path, size_t buf_size = 1024 * 1024)        : device_fd(-1)buffer_size(buf_size){        device_fd = open(device_path, O_RDWR | O_NONBLOCK);if (device_fd < 0) {throwstd::runtime_error("Failed to open sensor device");        }        data_buffer = std::make_unique<uint8_t[]>(buffer_size);    }    SensorDriver(const SensorDriver&) = delete;    SensorDriver& operator=(const SensorDriver&) = delete;    SensorDriver(SensorDriver&& other) noexcept        : device_fd(other.device_fd),           data_buffer(std::move(other.data_buffer)),          buffer_size(other.buffer_size) {        other.device_fd = -1;        other.buffer_size = 0;    }    ~SensorDriver() {if (device_fd >= 0) {            close(device_fd);        }    }std::optional<std::vector<uint8_t>> read_data(uint32_t timeout_ms = 100){std::lock_guard<std::mutex> lock(access_mutex);structpollfdpfd;        pfd.fd = device_fd;        pfd.events = POLLIN;int ret = poll(&pfd, 1, timeout_ms);if (ret < 0) {returnstd::nullopt;        }if (ret == 0 || !(pfd.revents & POLLIN)) {returnstd::nullopt;        }ssize_t bytes_read = read(device_fd, data_buffer.get(), buffer_size);if (bytes_read < 0) {returnstd::nullopt;        }returnstd::vector<uint8_t>(data_buffer.get(), data_buffer.get() + bytes_read);    }};

这种RAII封装确保了无论函数如何退出——正常返回、提前返回,还是抛出异常——设备都会被正确关闭。在自动驾驶系统中,这种保证意味着即使某个传感器数据处理模块出现异常,系统也能安全地释放硬件资源,继续运行其他模块。

在多线程环境中,RAII配合智能指针可以实现更安全的资源管理:

classMultiSensorFusion {private:std::shared_ptr<SensorDriver> lidar_driver;std::shared_ptr<SensorDriver> camera_driver;std::shared_ptr<SensorDriver> radar_driver;std::shared_ptr<std::mutex> fusion_mutex;std::thread fusion_thread;std::atomic<bool> running{false};public:    MultiSensorFusion() {        lidar_driver = std::make_shared<SensorDriver>("/dev/lidar0");        camera_driver = std::make_shared<SensorDriver>("/dev/camera0");        radar_driver = std::make_shared<SensorDriver>("/dev/radar0");        fusion_mutex = std::make_shared<std::mutex>();    }voidstart(){        running = true;        fusion_thread = std::thread([this]() {            fusion_loop();        });    }voidstop(){        running = false;if (fusion_thread.joinable()) {            fusion_thread.join();        }    }private:voidfusion_loop(){while (running) {auto lidar_data = lidar_driver->read_data(10);auto camera_data = camera_driver->read_data(10);auto radar_data = radar_driver->read_data(10);std::lock_guard<std::mutex> lock(*fusion_mutex);if (lidar_data && camera_data && radar_data) {                perform_fusion(*lidar_data, *camera_data, *radar_data);            }        }    }voidperform_fusion(conststd::vector<uint8_t>& lidar, conststd::vector<uint8_t>& camera,conststd::vector<uint8_t>& radar);};

通过shared_ptr和RAII的组合,我们不仅实现了自动资源管理,还实现了引用计数,确保传感器驱动在最后一个使用者释放时才真正关闭。这种机制在模块化设计的自动驾驶系统中非常有用。

传感器融合:现代C++特性的综合应用

传感器融合是自动驾驶系统的核心,它需要将来自激光雷达、摄像头、毫米波雷达等多种传感器的数据进行时间和空间对齐,然后进行融合处理。这个过程对实时性和准确性要求极高。

传感器融合架构

时间同步是传感器融合的第一步,也是最为关键的一步。不同传感器的数据采集频率不同,如激光雷达可能是20Hz,摄像头可能是30Hz,而毫米波雷达可能是50Hz。我们需要在这些不同频率的数据流中找到时间上最接近的匹配。

使用现代C++,我们可以实现一个高效的时间同步算法:

template<typename RadarT, typename CameraT>classSensorSync {private:structSyncedPair {        RadarT radar_data;        CameraT camera_data;double time_diff;    };double max_time_diff_threshold;public:explicitSensorSync(double threshold_sec = 0.1)        : max_time_diff_threshold(threshold_sec){}std::vector<SyncedPair> sync(conststd::vector<RadarT>& radar_list,conststd::vector<CameraT>& camera_list){std::vector<SyncedPair> synced;        synced.reserve(std::min(radar_list.size(), camera_list.size()));for (constauto& radar : radar_list) {auto camera_it = find_closest_camera(radar, camera_list);if (camera_it != camera_list.end()) {double time_diff = std::abs(radar.timestamp - camera_it->timestamp);if (time_diff <= max_time_diff_threshold) {                    synced.push_back({radar, *camera_it, time_diff});                }            }        }return synced;    }private:autofind_closest_camera(const RadarT& radar, conststd::vector<CameraT>& camera_list) -> decltype(auto{returnstd::min_element(            camera_list.begin(),             camera_list.end(),            [&radar](const CameraT& a, const CameraT& b) {returnstd::abs(a.timestamp - radar.timestamp) < std::abs(b.timestamp - radar.timestamp);            }        );    }};

这个实现使用了C++17的std::min_element算法,结合lambda表达式实现了时间戳的最近邻匹配。在实际测试中,这种实现可以在1ms内完成100个雷达数据和150个相机数据的同步,完全满足实时性要求。

空间对齐同样重要。不同传感器的坐标系不同,我们需要将它们统一到车辆坐标系中。这个过程涉及大量的矩阵运算和坐标变换,非常适合使用现代C++进行优化:

classCoordinateTransformer {private:    Eigen::Matrix4f lidar_to_vehicle;    Eigen::Matrix4f camera_to_vehicle;    Eigen::Matrix4f radar_to_vehicle;public:    CoordinateTransformer(const Eigen::Matrix4f& lidar_extrinsic,const Eigen::Matrix4f& camera_extrinsic,const Eigen::Matrix4f& radar_extrinsic)        : lidar_to_vehicle(lidar_extrinsic),          camera_to_vehicle(camera_extrinsic),          radar_to_vehicle(radar_extrinsic) {}template<typename PointT>    Eigen::Vector3f transform(const PointT& point, SensorType type)const{Eigen::Vector4f homogeneous(point.x, point.y, point.z, 1.0f);        Eigen::Vector4f transformed;switch (type) {case SensorType::LIDAR:                transformed = lidar_to_vehicle * homogeneous;break;case SensorType::CAMERA:                transformed = camera_to_vehicle * homogeneous;break;case SensorType::RADAR:                transformed = radar_to_vehicle * homogeneous;break;default:throwstd::invalid_argument("Unknown sensor type");        }return transformed.head<3>();    }template<typename PointCloudT>voidtransform_cloud(PointCloudT& cloud, SensorType type)const{#pragma omp parallel forfor (size_t i = 0; i < cloud.size(); ++i) {auto transformed = transform(cloud[i], type);            cloud[i].x = transformed.x();            cloud[i].y = transformed.y();            cloud[i].z = transformed.z();        }    }};

这个实现使用了Eigen库进行矩阵运算,并结合OpenMP的指令进行并行加速。在实际应用中,这种实现能够以微秒级的延迟完成10万个点云的坐标变换。

C++训练营来了!

一个专为校招、社招跳槽的同学打造的1v1 项目实战训练营,提供量身定制训练计划、导师每日代码review,简历优化,大厂强度模拟面试等服务,运营 10 个月,已助力多位学员斩获大厂offer!

想要了解训练营详细介绍,可以联系小助手(vx: cppmiao24)

推荐阅读:

警惕!这行看似人畜无害的 auto 推导,正在悄悄拷贝你的大对象!
C++17的string_view为什么不建议存储?
C++20的ranges库,让你的代码更优雅

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-05-07 12:34:09 HTTP/2.0 GET : https://e.mffb.com.cn/a/487247.html
  2. 运行时间 : 0.096830s [ 吞吐率:10.33req/s ] 内存消耗:4,421.34kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=a44ebf14c3a5a0ce018c8c37350e937d
  1. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/runtime/temp/600e51726691ba7063b44bb89d9aaaff.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/e.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000784s ] mysql:host=127.0.0.1;port=3306;dbname=e_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001029s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000345s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000272s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000664s ]
  6. SELECT * FROM `set` [ RunTime:0.000260s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000774s ]
  8. SELECT * FROM `article` WHERE `id` = 487247 LIMIT 1 [ RunTime:0.001132s ]
  9. UPDATE `article` SET `lasttime` = 1778128449 WHERE `id` = 487247 [ RunTime:0.001714s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000248s ]
  11. SELECT * FROM `article` WHERE `id` < 487247 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000520s ]
  12. SELECT * FROM `article` WHERE `id` > 487247 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002035s ]
  13. SELECT * FROM `article` WHERE `id` < 487247 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002366s ]
  14. SELECT * FROM `article` WHERE `id` < 487247 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.006362s ]
  15. SELECT * FROM `article` WHERE `id` < 487247 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.009295s ]
0.098399s