Google Test(gtest) Notes
平台要求
- 编译器 >= C++ 11
- gcc5.0+
- clang5.0+
- msvc2015+
- 参考:https://google.github.io/googletest/platforms.html
基本概念
Nginx Notes
概述
正则语法
使用 perl 正则语法
Nginx 三种代理模式
Grep Command Notes
反向查找
- -v
- –invert-match
- ?
- 查找没有被匹配到的内容
pattern 指定 -e pattern
-e pattern
perl 格式 regexp -P
-P
特点:
支持 extended regexp 的全套功能
- eg:
[[:digit:]]+
- eg:
支持类似 python regex 的功能
- eg:
\d+(\.\d+)?G
- eg:
有限制的 perl regexp 功能实现
Python Memory Profile Notes
工具
- 内存分配跟踪 trace memory allocations
- 官方库
- memory_profiler
- 逐行 profile
line-profiler
命令行使用
1 2 3 4 5# 第一步 ---> 生成 profile 结果文件 --> your_script.py.lprof kernprof -l -v your_script.py # 第二步 ---> 格式化展示 python -m line_profiler your_script.py.lprof例子
- 注意:不需要导入 profile 装饰器