动态链接库统计分析

December 09, 2023
测试
测试
测试
测试
5 分钟阅读

压缩工具compress-tools 0.6.0发布

compress-tools 0.6.0 released https://crates.io/crates/compress-tools

压缩工具compress-tools 0.6.0发布。compress-tools是基于libarchive的开发的,并提供部分原库的压缩功能。这个工具现在可以解压:

  • compressed files 压缩文件
  • archive files 归档压缩文件
  • single file from an archive 归档创建的单一文件

tiny 0.6.0 - Rust语言开发的IRC终端客户端管宣正式发布。

Announcing tiny 0.6.0 - console IRC client in Rust https://github.com/osa1/tiny

tiny 0.6.0 - Rust语言开发的IRC终端客户端管宣正式发布。 安装很简单:

    $ cargo install --path tiny

If you don't want to clone the repo, you can use

    $ cargo install --git https://github.com/osa1/tiny

一个基于Tezos区块链的加密通讯软件,完全由Rust开发。

An encrypted messenger backed by the Tezos blockchain, written entirely in Rust。 https://github.com/mt-caret/mizu/

一个基于Tezos区块链的加密通讯软件,完全由Rust开发。很初级,但是私密,去中心化,异步通讯,有趣,类似实现了PGP加密算法的电子邮件系统,尽可能避免通信内容被泄露。

动态链接库统计分析

Statistics on dynamic linking https://drewdevault.com/dynlib.html

你开发部署的程序比如一个普通的系统有经常用到动态链接库吗?统计表明很少。一般系统使用动态链接库的检测可以通过通过一个脚本来统计出来:

libs.awk
--------------------------
    /\t.*\.so.*/ {
        n=split($1, p, "/")
        split(p[n], l, ".")
        lib=l[1]
        if (libs[lib] == "") {
            libs[lib] = 0
        }
        libs[lib] += 1
    }
    END {
        for (lib in libs) {
            print libs[lib] "\t" lib
        }
    }

Usage 用法:
-------------------------

    $ find /usr/bin -type f -executable -print \
      | xargs ldd 2>/dev/null \
      | awk -f libs.awk \
      | sort -rn > results.txt
    $ awk '{ print NR "\t" $1 }' < results.txt > nresults.txt
    $ gnuplot
    gnuplot> plot 'nresults.txt'

my results,我的测试结果:
--------------------------

    $ find /usr/bin -type f -executable -print | wc -l
    5688
    $ head -n20 < results.txt
    4496  libc
    4484  linux-vdso
    4483  ld-linux-x86-64
    2654  libm
    2301  libdl
    2216  libpthread
    1419  libgcc_s
    1301  libz
    1144  libstdc++
    805  liblzma
    785  librt
    771  libXdmcp
    771  libxcb
    771  libXau
    755  libX11
    703  libpcre
    667  libglib-2
    658  libffi
    578  libresolv
    559  libXext


动态链接库会很快吗?答案是不,还是静态链接库快很多,结果:

    Linkage  Avg. startup time
    Dynamic  137263 ns
    Static  64048 ns

Rust + Actix + CosmosDB (MongoDB) API入门教程.

Rust + Actix + CosmosDB (MongoDB) tutorial API. https://dev.to/jbarszczewski/rust-actix-cosmosdb-mongodb-tutorial-api-17i5

在做一个开发项目的时候需要一个简单的API的后台,就打算自己搞一个,Rust是最佳选择,同时也打算以此新学习一门全新的技术。现在微软的Azure CosmosDB也有免费的VM可以用,所以简直就是为学习并快速使用Rust语言做小型项目最完美的环境。

完成后的项目代码放在github上:https://github.com/jbarszczewski/plant-server

继续阅读

更多来自我们博客的帖子

如何安装 BuddyPress
由 测试 December 17, 2023
经过差不多一年的开发,BuddyPress 这个基于 WordPress Mu 的 SNS 插件正式版终于发布了。BuddyPress...
阅读更多
Filter如何工作
由 测试 December 17, 2023
在 web.xml...
阅读更多
如何理解CGAffineTransform
由 测试 December 17, 2023
CGAffineTransform A structure for holding an affine transformation matrix. ...
阅读更多