Skip to content

shell909090/context

Repository files navigation

项目简介

测试各种context switch的性能和环境对性能的影响。

文件命名

s_打头的是单线程模式c代码:

  • s_call: 调用开销
  • s_syscall: 内核调用开销
  • s_fork: 进程fork开销

t_打头的是多线程模式c代码:

  • t_thread: 线程create开销
  • t_yield: 线程切换开销
  • t_sleep: 线程sleep切换开销
  • t_lock: 线程lock切换开销

py_打头是python代码:

  • py_greenlet: python下greenlet性能测试
  • py_yield: python下yield性能测试
  • http_fork_thread: 进城/线程模式http服务器
  • http_tpool: 线程池模式http服务器

g_打头的是golang测试代码:

  • g_chan: chan模式性能
  • g_goroutine: goroutine生成销毁开销(TODO: 注意,未必等待完成)
  • g_sched: sched模式性能
  • g_lock: lock模式性能测试

h_打头的是辅助代码:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published