前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【Rust 日报】2024-01-21 ballast 一个简单的 API 负载测试工具

【Rust 日报】2024-01-21 ballast 一个简单的 API 负载测试工具

作者头像
MikeLoveRust
发布2024-01-23 10:30:34
1410
发布2024-01-23 10:30:34
举报
文章被收录于专栏:Rust语言学习交流

[new lib] pcodec

使用分位数的数值数据的无损压缩和解压缩工具。用法示例:

代码语言:javascript
复制
use pco::standalone::{auto_compress, auto_decompress};
use pco::DEFAULT_COMPRESSION_LEVEL;

fn main() {
  // your data
  let mut my_ints = Vec::new();
  for i in 0..100000 {
    my_ints.push(i as i64);
  }

  // Here we let the library choose a configuration with default compression
  // level. If you know about the data you're compressing, you can compress
  // faster by creating a `CompressorConfig`.
  let compressed: Vec<u8> = auto_compress(&my_ints, DEFAULT_COMPRESSION_LEVEL);
  println!("compressed down to {} bytes", compressed.len());

  // decompress
  let recovered = auto_decompress::<i64>(&compressed).expect("failed to decompress");
  println!("got back {} ints from {} to {}", recovered.len(), recovered[0], recovered.last().unwrap());
}

GitHub: https://github.com/mwlon/pcodec

[new lib] postagger

词性标注工具。使用示例:

代码语言:javascript
复制
use postagger::PerceptronTagger;

fn main() {
    let tagger = PerceptronTagger::new( "tagger/weights.json" , "tagger/classes.txt" , "tagger/tags.json" )  ; 
    let tags = tagger.tag( "the quick brown fox jumps over the lazy dog" ) ;
    for tag in &tags {
        println!( "{} {} {}" , tag.word , tag.tag , tag.conf ) ; 
    }
}

GitHub: https://github.com/shubham0204/postagger.rs

[new lib] ballast

一个简单的 API 负载测试工具,可用于比较 API 的性能。

GitHub: https://github.com/synoet/ballast

[new lib] rust-ecosystem-simulation

一个简单的生态系统模拟器。

GitHub: https://github.com/bones-ai/rust-ecosystem-simulation

From 日报小组 长琴

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2024-01-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Rust语言学习交流 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • [new lib] pcodec
  • [new lib] postagger
  • [new lib] ballast
  • [new lib] rust-ecosystem-simulation
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档