一次性能测试

2021-09-15 11:20:08 浏览数 (1)

找了一台Intel的设备,跑了一次性能测试

可用横屏观看

代码语言:javascript复制
Intel Haswell Processor
主频 2808400492Hz
VxWorks 6.9 SMP

循环10遍
数据单位: 微秒

测试项                             平均值    最小值    最大值
----------------                --------  --------  --------
/* binary semaphore */
Vx_SemBCreate                      0.499     0.478     0.530
Vx_SemBDelete                      0.791     0.779     0.810
Vx_SemBGiveNoTask                  0.077     0.076     0.077
Vx_SemBGiveTaskInQ                 0.103     0.099     0.117
Vx_SemBTakeUnavail                 0.075     0.074     0.076
Vx_SemBTakeAvail                   0.070     0.069     0.072

/* counting semaphore */
Vx_SemCCreate                      0.488     0.466     0.540
Vx_SemCDelete                      0.794     0.779     0.820
Vx_SemCGiveNoTask                  0.057     0.056     0.057
Vx_SemCGiveTaskInQ                 0.112     0.108     0.126
Vx_SemCTakeUnavail                 0.044     0.042     0.046
Vx_SemCTakeAvail                   0.050     0.050     0.050

/* mutex semaphore */
Vx_SemMCreate                      0.487     0.474     0.524
Vx_SemMDelete                      0.788     0.772     0.836
Vx_SemMGiveNoTask                  0.062     0.062     0.063
Vx_SemMGiveTaskInQ                 0.141     0.133     0.163
Vx_SemMTakeUnavailOwn              0.041     0.040     0.042
Vx_SemMTakeAvail                   0.052     0.051     0.055

/* reader/writer semaphore */
Vx_SemRWCreate                     0.528     0.501     0.580
Vx_SemRWDelete                     0.818     0.794     0.846
Vx_SemRWGiveNoTask                 0.068     0.067     0.069
Vx_SemRWGiveRNoTask                0.071     0.068     0.087
Vx_SemRWGiveWTaskInQW              0.100     0.091     0.140
Vx_SemRWGiveRTaskInQW              0.077     0.070     0.112
Vx_SemRWGiveWTaskInQR              0.075     0.068     0.092
Vx_SemRWTakeUnavailOwn             0.060     0.058     0.062
Vx_SemRWTakeRUnavailOwn            0.057     0.056     0.063
Vx_SemRWTakeAvail                  0.060     0.059     0.061
Vx_SemRWTakeRAvail                 0.058     0.058     0.059

/* task-related */
Vx_TaskSpawn                       3.795     3.748     3.861
Vx_TaskDelete                      3.952     3.914     3.978
Vx_TaskInit                        3.205     3.132     3.394
Vx_TaskActivate                    0.075     0.070     0.085
Vx_TaskSuspendReady                0.095     0.091     0.116
Vx_TaskSuspendPend                 0.075     0.071     0.093
Vx_TaskSuspendSusp                 0.072     0.072     0.073
Vx_TaskSuspendDelay                0.074     0.072     0.076
Vx_TaskResumeReady                 0.055     0.054     0.055
Vx_TaskResumePend                  0.054     0.053     0.055
Vx_TaskResumeSusp                  0.075     0.069     0.088
Vx_TaskResumeDelay                 0.054     0.053     0.055
Vx_TaskPrioritySetReady            0.099     0.097     0.107
Vx_TaskPrioritySetPend             0.080     0.079     0.081

/* watchdog */
Vx_WdCreate                        0.456     0.436     0.496
Vx_WdDelStarted                    0.790     0.750     0.819
Vx_WdDelNotStarted                 0.787     0.766     0.819
Vx_WdStartQEmpty                   0.252     0.246     0.264
Vx_WdStartQFull                    0.258     0.251     0.270
Vx_WdCancel                        0.063     0.059     0.072

/* message queue */
Vx_MsgQCreate                      0.535     0.519     0.596
Vx_MsgQDelete                      0.894     0.874     0.935
Vx_MsgQSendNoPend                  0.494     0.487     0.515
Vx_MsgQSendPend                    0.523     0.517     0.536
Vx_MsgQSendQFull                   0.326     0.321     0.342
Vx_MsgQRecvAvail                   0.402     0.398     0.418
Vx_MsgQRecvNoAvail                 0.236     0.230     0.246

/* events */
Vx_EventSendSelf                   0.080     0.078     0.082
Vx_EventReceiveAvailable           0.027     0.025     0.029
Vx_EventReceiveUnavailable         0.038     0.036     0.043
Vx_EventTaskSendWanted             0.087     0.081     0.101
Vx_EventTaskSendUnwanted           0.075     0.071     0.077

/* interrupt response time */
Vx_IntEntNoSched                   4.265     4.245     4.292
Vx_IntTotalNoSched                 4.304     4.241     4.335
Vx_IntTotalWithSched               4.819     4.786     4.842
Vx_SmpAffIntTotalWithSched         5.917     5.893     5.966
Vx_SmpNoAffIntTotalWithSched       5.917     5.882     5.936

/* context switch */
Vx_CtxSemPend                      0.380     0.319     0.844
Vx_CtxSemUnpend                    0.336     0.327     0.366
Vx_CtxMsgQPend                     0.487     0.466     0.599
Vx_CtxMsgQUnpend                   0.881     0.870     0.900
Vx_CtxEventPend                    0.323     0.309     0.363
Vx_CtxEventUnpend                  0.316     0.299     0.340
Vx_CtxSmpAffinitySemUnPend         1.608     1.582     1.652
Vx_CtxSmpAffinityMsgQUnPend        2.404     2.343     2.483
Vx_CtxSmpAffinityEventUnPend       1.564     1.541     1.591
Vx_CtxSmpNoAffinitySemUnPend       1.567     1.546     1.619
Vx_CtxSmpNoAffinityMsgQUnPend      2.377     2.326     2.438
Vx_CtxSmpNoAffinityEventUnPend     1.535     1.505     1.559

/* binary semaphore in RTP */
Rtp_SemBCreate                     1.232     1.209     1.265
Rtp_SemBDelete                     1.806     1.786     1.837
Rtp_SemBGiveNoTask                 0.408     0.404     0.412
Rtp_SemBGiveTaskInQ                0.434     0.419     0.450
Rtp_SemBTakeUnavail                0.466     0.464     0.471
Rtp_SemBTakeAvail                  0.397     0.393     0.400

/* counting semaphore in RTP */
Rtp_SemCCreate                     1.215     1.194     1.246
Rtp_SemCDelete                     1.808     1.782     1.829
Rtp_SemCGiveNoTask                 0.389     0.388     0.390
Rtp_SemCGiveTaskInQ                0.439     0.434     0.451
Rtp_SemCTakeUnavail                0.433     0.430     0.435
Rtp_SemCTakeAvail                  0.383     0.380     0.386

/* mutex semaphore in RTP */
Rtp_SemMCreate                     1.242     1.216     1.299
Rtp_SemMDelete                     1.797     1.782     1.814
Rtp_SemMGiveNoTask                 0.090     0.089     0.091
Rtp_SemMGiveTaskInQ                0.590     0.580     0.644
Rtp_SemMTakeUnavailOwn             0.076     0.075     0.078
Rtp_SemMTakeAvail                  0.087     0.087     0.089

/* task-related in RTP */
Rtp_TaskSpawn                     13.584    13.417    14.045
Rtp_TaskDelete                    15.934    15.796    16.012
Rtp_TaskSuspendReady               0.440     0.426     0.493
Rtp_TaskSuspendPend                0.424     0.406     0.446
Rtp_TaskSuspendSusp                0.421     0.419     0.425
Rtp_TaskSuspendDelay               0.420     0.408     0.439
Rtp_TaskResumeReady                0.403     0.401     0.408
Rtp_TaskResumePend                 0.404     0.400     0.406
Rtp_TaskResumeSusp                 0.418     0.407     0.430
Rtp_TaskResumeDelay                0.405     0.402     0.407

/* message queue in RTP */
Rtp_MsgQCreate                     0.897     0.882     0.930
Rtp_MsgQDelete                     1.514     1.496     1.534
Rtp_MsgQSendNoPend                 0.861     0.846     0.910
Rtp_MsgQSendPend                   0.883     0.875     0.889
Rtp_MsgQSendQFull                  0.736     0.727     0.742
Rtp_MsgQRecvAvail                  0.755     0.743     0.762
Rtp_MsgQRecvNoAvail                0.651     0.645     0.657

/* events in RTP */
Rtp_EventSendSelf                  0.308     0.296     0.316
Rtp_EventReceiveAvailable          0.290     0.281     0.299
Rtp_EventReceiveUnavailable        0.359     0.354     0.367
Rtp_EventTaskSendWanted            0.418     0.408     0.445
Rtp_EventTaskSendUnwanted          0.394     0.385     0.400

/* context switch in RTP */
Rtp_CtxSemPend                     0.599     0.586     0.614
Rtp_CtxSemUnpend                   0.611     0.602     0.627
Rtp_CtxMsgQPend                    0.776     0.754     0.807
Rtp_CtxMsgQUnpend                  1.183     1.175     1.199
Rtp_CtxEventPend                   0.581     0.562     0.607
Rtp_CtxEventUnpend                 0.552     0.526     0.571

/* system call in RTP */
Rtp_Syscall                        0.232     0.226     0.237

/* RTP to RTP */
Rtp_RtpToRtpSemPend                0.687     0.671     0.710
Rtp_RtpToRtpSemUnpend              0.715     0.708     0.731
Rtp_RtpToRtpMsgQPend               0.871     0.854     0.898
Rtp_RtpToRtpMsgQUnpend             1.364     1.348     1.400
Rtp_RtpToRtpEventPend              0.657     0.645     0.708
Rtp_RtpToRtpEventUnpend            0.627     0.617     0.663
Rtp_RtpToRtpSmpSemUnpend           1.827     1.751     1.971
Rtp_RtpToRtpSmpMsgQUnpend          2.990     2.920     3.146
Rtp_RtpToRtpSmpEventUnpend         1.631     1.549     1.752

相对耗时的

  • 创建任务,因为有大块内存操作
  • RTP操作,因为有系统调用

总体来说,都是亚微秒级的

0 人点赞