之前在 Openwrt 负载 中也曾经谈到过 CPU 的负载,通过 top, uptime 等等命令都可以非常快速的查询当前 CPU 的负载。
CPU 的 load average(平均负载)指的是一段时间内正在使用和等待使用 CPU 的平均任务数。
还有一个判断 CPU 的指标是 CPU 的利用率。同样使用 top 命令也能够查到。但是并不意味着负载高就一定 CPU 利用率高。
如果用电话亭来表示 CPU,把等待打电话的人比作 CPU 需要处理的任务的话,那么假设一队人排队打电话,每个人只能打 1 分钟,时间到了必须重新排队,那么随着时间变化,排
Read more ...
deploy 遇到 400 错误
错误日志
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxxx: Failed to deploy artifacts: Could not transfer artifact xxx:pom:1.0.1 from/to archiva.internal (http://nexus.xxx/nexus/content/reposito
Read more ...
行为模式关注类和对象如何交互,以及如何负责对应的事务,也就是怎么定义类的行为和职责。
行为模式还可以大致分成:类行为模式(继承)和对象行为模式(组合或聚合),后者更符合「合成复用原则」。
具体模式
Observer, Notifies multiple objects about state changes in another object.
Strategy, Defines interchangeable algorithms within a family of algorithms
Command, Encapsulates
Read more ...