查询头文件是哪个包提供的
$sudo apt-get install apt-file
$sudo apt-file update
$apt-file search "/usr/include/limits.h"
$sudo apt-get install apt-file
$sudo apt-file update
$apt-file search "/usr/include/limits.h"
环境
sudo apt-get install yasm make
编译
"D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
bash
./configure --toolchain=msvc --arch=x86_32 --enable-x86asm --enable-shared --enable-w32threads --disable-doc --disable-static --enable-optimizations --disable-debug --prefix=output
make install
m1机器编译arm64
./configure --arch=arm64 --disable-shared --enable-pthreads --disable-doc --enable-static --enable-optimizations --disable-debug --prefix=output_arm64
make install
intel机器编译x86_64
./configure --arch=x86_64 --disable-shared --enable-pthreads --disable-doc --enable-static --enable-optimizations --disable-debug --prefix=output_x86_64
make install
合并
lipo -create output_arm64/lib/libavcodec.a output_x86_64/lib/libavcodec.a -output /prebuilt/mac/libavcodec.a
strip -S /prebuilt/mac/libavcodec.a
golang path 库不适配win,用path/filepath替代
坑
now1 := time.Now()
time.Sleep(18 * time.Microsecond)
now2 := time.Now()
fmt.Println(now2.Sub(now1))
---- output ----
30.938µs
33.749µs
26.979µs
26.146µs
25.52µs
25.209µs
27.292µs
25µs
150.52µs
28.021µs
27.656µs
25.52µs
146.77µs
27.709µs
25µs
142.447µs
149.843µs
sudo apt install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7
sudo update-alternatives --config gcc
sysbench --test=oltp_read_write --tables=10 --table-size=1000000 --report-interval=10 --time=3600 --threads=50 --db-driver=mysql --mysql-socket=/tmp/mysql.sock --mysql-user=root --mysql-password='xxxx' --mysql-db=sbtest run
SQL statistics:
queries performed:
read: 15339058
write: 4382588
other: 2191294
total: 21912940
transactions: 1095647 (304.28 per sec.)
queries: 21912940 (6085.57 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 3600.8045s
total number of events: 1095647
Latency (ms):
min: 2.74
avg: 164.30
max: 5033.06
95th percentile: 707.07
sum: 180014353.79
Threads fairness:
events (avg/stddev): 21912.9400/80.08
execution time (avg/stddev): 3600.2871/0.22
SQL statistics:
queries performed:
read: 2969064
write: 848304
other: 424152
total: 4241520
transactions: 212076 (58.89 per sec.)
queries: 4241520 (1177.79 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 3601.2587s
total number of events: 212076
Latency (ms):
min: 3.57
avg: 848.89
max: 6098.82
95th percentile: 1973.38
sum: 180029441.14
Threads fairness:
events (avg/stddev): 4241.5200/32.35
execution time (avg/stddev): 3600.5888/0.34
mysql> reset master;
$mysql -uroot -p
mysql>use mysql;
mysql>
mysql> show variables like 'log_bin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_bin | ON |
+---------------+-------+
1 row in set (0.01 sec)
Xcode, In the "Edit Scheme" window, in the "Options" tab, uncheck "Document Versions
使用 Raspberry Pi Imager 旋转系统,自动下载写入SD卡,比之前的命令行操作简单。