DatabaseProcApplicationCreatedLinks
sybsystemprocssp_prt_bigtimediff  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     ** sp_prt_bigtimediff
4     **
5     **	Print the time diff component fields using the user supplied 
6     **	header line.
7     **
8     ** Parameters:
9     **	@header	- Description of elapsed interval
10    **	@start	- Start of time interval (expected to be < @end)
11    **	@end	- End of time interval
12    {
13    */
14    create or replace procedure sp_prt_bigtimediff(
15        @header varchar(200)
16        , @start bigtime
17        , @end bigtime
18    
19    ) as
20        begin -- {
21            declare @time_hr unsigned bigint
22                , @time_min unsigned bigint
23                , @time_s unsigned bigint
24                , @time_ms unsigned bigint
25                , @time_ucs unsigned bigint
26                , @time_total_ucs unsigned bigint
27    
28            exec sp_get_bigtimediff @start, @end
29                , @time_hr output
30                , @time_min output
31                , @time_s output
32                , @time_ms output
33                , @time_ucs output
34                , @time_total_ucs output
35    
36            print "%1!: (Total %2! us) %3! h: %4! m : %5! s : %6! ms : %7! us"
37                , @header, @time_total_ucs
38                , @time_hr, @time_min, @time_s, @time_ms, @time_ucs
39    
40        end -- }
41    


exec sp_procxmode 'sp_prt_bigtimediff', 'AnyMode'
go

Grant Execute on sp_prt_bigtimediff to public
go
DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_prt_bigtimediff  
 MNER 3 No Error Check should check return value of exec 28
 MUCO 3 Useless Code Useless Brackets in create proc 14
 MUCO 3 Useless Code Useless Begin-End Pair 20
 MTR1 2 Metrics: Comments Ratio Comments: 26% 14
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 2 = 1dec - 1exi + 2 14
 MTR3 2 Metrics: Query Complexity Complexity: 4 14

DEPENDENCIES
PROCS AND TABLES USED
calls proc sybsystemprocs..sp_get_bigtimediff  

CALLERS
called by proc sybsystemprocs..sp_spaceused