# Measurement of average time that a FS took

How do I convert “audittimestamp” to regular date/time hh:mm:ss:msec from table “wmservice”?
Data type of “audittimestamp” is: Number[19] in wmservice. Do any body has query to find out how much time(max, min,avg, number of times it got called) my flow service took? Should I use “wmservice” for this kind of calculations or is there any other table in wM which give this kind of statistics?

Please don’t indicate that I have to use BPM or BAM for this. We don’t have Bpm/Bam in place currently.

Sudhesh,
Assuming (the start and end of) your service is logged in the wmservice table, the execution time will be available in one of the fields in the table.

You can write a query something like,

SELECT [SIZE=2]max[/size]SIZE=2, [/size][SIZE=2]min[/size]SIZE=2, [/size][SIZE=2]avg[/size]SIZE=2, [/size][SIZE=2]count[/size]SIZE=2
[/size][SIZE=2]FROM [/size]wmservice
[SIZE=2]where [/size]servicename = ‘YourServiceName’
[SIZE=2]and [/size]status = 2

1. What does the status field indicate (1,2,3,4)?

I am using:
SELECT maxSIZE=2, [/size]minSIZE=2, [/size]avgSIZE=2, [/size]countSIZE=2
[/size]FROM wmservice
where servicename = ‘YourServiceName’
and duration != 0 ( or RESUBMITTABLE = 0).

I am trying to eliminate the duplicate service name by doing duration!=0 or resubmittable = 0. But I don’t have clear idea of what it means by duration, resubmittable or status.

[SIZE=2][B][SIZE=2][COLOR=#008000][/size][/b][/SIZE][/COLOR]
2. Also how do I convert “audittimestamp” to regular date/time hh:mm:ss:msec from table “wmservice”?

What I am trying to do is that, for the Max(duration) get the corresponding “audittimestamp” and try to see what happend, in wM serverlogs?

I am trying to see why the transaction took that long during that max(duration).

1. Where can get the documentation of the fields relating to "wmservice"table?

The “audittimestamp” is the number of milliseconds elapsed since 1970/01/01 00:00:00.000.

To get that converted to a regular date/time you’ll just have to do a bit of calculation.

If you’re running on an Oracle DB you could use the following:
to_date(‘19700101’, ‘YYYYMMDD’) + (audittimestamp/(1000.006060*24))

1. What does the status field indicate (1,2,3,4)?

The statuses mean Started(1), Completed(2), Failed (4). Your query and the query given earlier, should return the same results.

1. Also how do I convert “audittimestamp” to regular date/time hh:mm:ss:msec from table “wmservice”?

luismrolo, in the above post, is correct.

1. Where can get the documentation of the fields relating to "wmservice"table?

Logging and Monitoring guide and/or Monitor Users Guide