Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
eb37939b
提交
eb37939b
authored
1月 17, 2019
作者:
Mike Jerris
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1664 in FS/freeswitch from fs-11615 to master
* commit '
d76cac15
': FS-11615 fix compiler warning
上级
9c18e272
d76cac15
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
6 行删除
+10
-6
switch_event.c
tests/unit/switch_event.c
+4
-4
switch_hash.c
tests/unit/switch_hash.c
+2
-2
switch_ivr_originate.c
tests/unit/switch_ivr_originate.c
+4
-0
没有找到文件。
tests/unit/switch_event.c
浏览文件 @
eb37939b
...
@@ -27,7 +27,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -27,7 +27,7 @@ FST_TEST_BEGIN(benchmark)
int
rc
=
0
,
loops
=
10
,
x
=
0
;
int
rc
=
0
,
loops
=
10
,
x
=
0
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
switch_status_t
status
=
SWITCH_STATUS_SUCCESS
;
char
**
index
=
NULL
;
char
**
index
=
NULL
;
u
nsigned
long
long
micro_total
=
0
;
u
int64_t
micro_total
=
0
;
double
micro_per
=
0
;
double
micro_per
=
0
;
double
rate_per_sec
=
0
;
double
rate_per_sec
=
0
;
...
@@ -63,7 +63,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -63,7 +63,7 @@ FST_TEST_BEGIN(benchmark)
micro_total
=
small_end_ts
-
small_start_ts
;
micro_total
=
small_end_ts
-
small_start_ts
;
micro_per
=
micro_total
/
(
double
)
loops
;
micro_per
=
micro_total
/
(
double
)
loops
;
rate_per_sec
=
1000000
/
micro_per
;
rate_per_sec
=
1000000
/
micro_per
;
printf
(
"switch_event add_header: Total %
ldus / %ld loops, %.2f us per loop, %.0f loops per second
\n
"
,
printf
(
"switch_event add_header: Total %
"
SWITCH_UINT64_T_FMT
"us / %d loops, %.2f us per loop, %.0f loops per second
\n
"
,
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
#endif
#endif
...
@@ -84,7 +84,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -84,7 +84,7 @@ FST_TEST_BEGIN(benchmark)
micro_total
=
small_end_ts
-
small_start_ts
;
micro_total
=
small_end_ts
-
small_start_ts
;
micro_per
=
micro_total
/
(
double
)
loops
;
micro_per
=
micro_total
/
(
double
)
loops
;
rate_per_sec
=
1000000
/
micro_per
;
rate_per_sec
=
1000000
/
micro_per
;
printf
(
"switch_event get_header: Total %
ldus / %l
d loops, %.2f us per loop, %.0f loops per second
\n
"
,
printf
(
"switch_event get_header: Total %
"
SWITCH_UINT64_T_FMT
"us / %
d loops, %.2f us per loop, %.0f loops per second
\n
"
,
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
#endif
#endif
...
@@ -101,7 +101,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -101,7 +101,7 @@ FST_TEST_BEGIN(benchmark)
micro_total
=
end_ts
-
start_ts
;
micro_total
=
end_ts
-
start_ts
;
micro_per
=
micro_total
/
(
double
)
loops
;
micro_per
=
micro_total
/
(
double
)
loops
;
rate_per_sec
=
1000000
/
micro_per
;
rate_per_sec
=
1000000
/
micro_per
;
printf
(
"switch_event Total %
ld
us / %d loops, %.2f us per loop, %.0f loops per second
\n
"
,
printf
(
"switch_event Total %
"
SWITCH_UINT64_T_FMT
"
us / %d loops, %.2f us per loop, %.0f loops per second
\n
"
,
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
}
}
...
...
tests/unit/switch_hash.c
浏览文件 @
eb37939b
...
@@ -24,7 +24,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -24,7 +24,7 @@ FST_TEST_BEGIN(benchmark)
switch_bool_t
verbose
=
SWITCH_TRUE
;
switch_bool_t
verbose
=
SWITCH_TRUE
;
const
char
*
err
=
NULL
;
const
char
*
err
=
NULL
;
switch_time_t
start_ts
,
end_ts
;
switch_time_t
start_ts
,
end_ts
;
u
nsigned
long
long
micro_total
=
0
;
u
int64_t
micro_total
=
0
;
double
micro_per
=
0
;
double
micro_per
=
0
;
double
rate_per_sec
=
0
;
double
rate_per_sec
=
0
;
int
x
=
0
;
int
x
=
0
;
...
@@ -131,7 +131,7 @@ FST_TEST_BEGIN(benchmark)
...
@@ -131,7 +131,7 @@ FST_TEST_BEGIN(benchmark)
micro_total
=
end_ts
-
start_ts
;
micro_total
=
end_ts
-
start_ts
;
micro_per
=
micro_total
/
(
double
)
loops
;
micro_per
=
micro_total
/
(
double
)
loops
;
rate_per_sec
=
1000000
/
micro_per
;
rate_per_sec
=
1000000
/
micro_per
;
printf
(
"switch_hash Total %
ld
us / %d loops, %.2f us per loop, %.0f loops per second
\n
"
,
printf
(
"switch_hash Total %
"
SWITCH_UINT64_T_FMT
"
us / %d loops, %.2f us per loop, %.0f loops per second
\n
"
,
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
micro_total
,
loops
,
micro_per
,
rate_per_sec
);
}
}
FST_TEST_END
()
FST_TEST_END
()
...
...
tests/unit/switch_ivr_originate.c
浏览文件 @
eb37939b
...
@@ -42,6 +42,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
...
@@ -42,6 +42,8 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
switch_assert
(
session
);
switch_assert
(
session
);
reporting
++
;
reporting
++
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_INFO
,
"session reporting %d
\n
"
,
reporting
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_INFO
,
"session reporting %d
\n
"
,
reporting
);
return
SWITCH_STATUS_SUCCESS
;
}
}
static
switch_status_t
my_on_destroy
(
switch_core_session_t
*
session
)
static
switch_status_t
my_on_destroy
(
switch_core_session_t
*
session
)
...
@@ -49,6 +51,8 @@ static switch_status_t my_on_destroy(switch_core_session_t *session)
...
@@ -49,6 +51,8 @@ static switch_status_t my_on_destroy(switch_core_session_t *session)
switch_assert
(
session
);
switch_assert
(
session
);
destroy
++
;
destroy
++
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"session destroy %d
\n
"
,
destroy
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"session destroy %d
\n
"
,
destroy
);
return
SWITCH_STATUS_SUCCESS
;
}
}
static
switch_state_handler_table_t
state_handlers
=
{
static
switch_state_handler_table_t
state_handlers
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论