精华内容
下载资源
问答
  • <ol><li>in,out and Duration time change ?</li><li>New Scene add ?</li></ol> <p><img width="712" alt="Ekran Resmi 2020-10-02 ÖS 9 04 38" src=...
  • The Influence of Satellite Configuration and Fault Duration Time on the Performance of Fault Detection in GNSS/INS Integration
  • <div><p>We have noticed that once the loan duration time for a device is up, we are still able to log into the device and continue to work (it does not lock up right away). But after a few days after ...
  • <div><p>To reproduce this issue create a test with extended execution time near 2 minutes and examine the duration chart. ...
  • <p>Could you please clarify us if there is anyway we can override the BLE advertisement duration timeout value from application and get an application callback when timeout expires or is this a bug ...
  • <p>However, unlike the poster there, I want to be able to see the duration timer when seeking. Setting to osd-level = 1 shows nothing, while level 2 and 3 permanently shows the duration timer. ...
  • <p>I do see the duration flashing for like 300msec at the start of the song start and then it goes to 00:00. The "current elapsed time" is working correctly. I see this flashing behavior both ...
  • <div><p>When I use have a short audio file (around 4 - 5 seconds) and I am trying to get the duration using audioController.stream.duration.second the duration is always about 2x - 2.5x longer then ...
  • <div><p>At the moment there is no possibility to set the duration of agenda items for related items (motion, assignment).</p><p>该提问来源于开源项目:OpenSlides/OpenSlides</p></div>
  • When working ALU IMS Patch team, we need to static the SU duration to add it to the patch report, the duration time alway is hard work, so I write the follow tool to auto do this work. 1 #!/usr/bi...

    When working ALU IMS Patch team, we need to static the SU duration to add it to the patch report, the duration time alway is hard work, so I write the follow tool to auto do this work.

     1 #!/usr/bin/python2.6
     2 import re,datetime
     3 file_name='/home/alzhong/logs/qtat1/R2860.01.13/sim-applycommitrollback-bld1.log'
     4 file=open(file_name,'r')
     5 acnum=[];time_res=[];lnum=0
     6 def trans_time(time):
     7     t1=datetime.datetime.strptime(time,'%y/%m/%d %H:%M:%S')
     8     return t1
     9 for (num,line) in enumerate(file):
    10 
    11     if(re.search(r'^(.*)BEGINNING SIM PROCEDURE(.*)$',line)):
    12         m=re.search(r'^(.*)BEGINNING SIM PROCEDURE(.*)$',line)
    13         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    14         acnum.append(trans_time(line[0:17]))
    15     elif(re.search(r'^(.*)CP_W(.*)$', line)):
    16         m=re.search(r'^(.*)CP_W(.*)$', line)
    17         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    18         acnum.append(trans_time(line[0:17]))
    19     elif(re.search(r"^(.*)VERIFY_S(.*)$", line)):
    20         m=re.search(r"^(.*)VERIFY_S(.*)$", line)
    21         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    22         acnum.append(trans_time(line[0:17]))
    23     elif(re.search(r"^(.*)--action commit(.*)$",line)):
    24         m=re.search(r"^(.*)--action commit(.*)$",line)
    25         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    26         acnum.append(trans_time(line[0:17]))
    27     elif(re.search(r"^(.*)COMPLETED SIM PROCEDURE(.*)$",line)):
    28         m=re.search(r"^(.*)COMPLETED SIM PROCEDURE(.*)$",line)
    29         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    30         acnum.append(trans_time(line[0:17]))
    31     elif(re.search(r"^(.*)RESUMING SIM PROCEDURE(.*)$",line)):
    32         m=re.search(r"^(.*)RESUMING SIM PROCEDURE(.*)$",line)
    33         print 'Step %d:'%(lnum), m.group(0);lnum+=1
    34         acnum.append(trans_time(line[0:17]))
    35 
    36 file.close()
    37 if(re.search(r"^(.*)backout(.*)$",file_name)):
    38     time_res.append((acnum[2]-acnum[0]).seconds/60)
    39     time_res.append((acnum[4]-acnum[3]).seconds/60)
    40     time_res.append((acnum[6]-acnum[5]).seconds/60)
    41     time_res.append(((acnum[8]-acnum[7])+(acnum[10]-acnum[9])+(acnum[13]-acnum[11])).seconds/60)
    42     print "\n3). sim --proc update --action apply to \"CP_WARNING\" %s mins" %(time_res[0])
    43     print "4). sim --proc update --action resume to  \"VERIFY_SOFTWARE\" %s mins"%(time_res[1])
    44     print "5). sim --proc update --action resume to  \"COMMIT\" %s mins"%(time_res[2])
    45     print "8). Backout from RXX to RXX  %s mins"%(time_res[3])
    46 elif(re.search(r"^(.*)rollback(.*)$",file_name)):
    47     time_res.append((acnum[2]-acnum[0]).seconds/60)
    48     time_res.append((acnum[4]-acnum[3]).seconds/60)
    49     time_res.append((acnum[6]-acnum[5]).seconds/60)
    50     time_res.append((acnum[8]-acnum[7]).seconds/60)
    51     time_res.append(((acnum[10]-acnum[9])+(acnum[12]-acnum[11])+(acnum[15]-acnum[13])).seconds/60)
    52     print "\n3). sim --proc update --action apply to \"CP_WARNING\" %s mins" %(time_res[0])
    53     print "4). sim --proc update --action resume to  \"VERIFY_SOFTWARE\" %s mins"%(time_res[1])
    54     print "5). sim --proc update --action resume to  \"COMMIT\" %s mins"%(time_res[2])
    55     print "6). sim --proc update --action commit to end of Patch %s mins"%(time_res[3])
    56     print "8). Rollback from RXX to RXX %s mins" %(time_res[4])
    57 if __name__ == '__main__':
    58     pass
    

    The output of the script as follows:

    <lsslogin1-alzhong>/home/alzhong/tools: ls
    simt
    <lsslogin1-alzhong>/home/alzhong/tools: ./simt
    Step 0: 14/06/16 12:31:32 BEGINNING SIM PROCEDURE 'update apply' type=hot ...
    Step 1: 14/06/16 13:18:42 RESUMING SIM PROCEDURE 'update apply' type=hot ...
    Step 2: 14/06/16 13:30:43 SIM0317 PAUSE_REQUEST: (PROCEDURE) [PAUSE(CP_WARNING): Use 'sim --proc update --action resume' to continue...] (update:1435)
    Step 3: 14/06/16 13:43:40 RESUMING SIM PROCEDURE 'update apply' type=hot ...
    Step 4: 14/06/16 13:47:49 SIM0343 PAUSE_REQUEST: (PROCEDURE) [PAUSE(VERIFY_SOFTWARE): Use 'sim --proc update --action resume' to continue...] (update:1634)
    Step 5: 14/06/16 13:54:26 RESUMING SIM PROCEDURE 'update apply' type=hot ...
    Step 6: 14/06/16 14:25:41 SIM0496 PAUSE_REQUEST: (COMMIT) [PAUSE(COMMIT): Use 'sim --proc update --action commit' to continue...] (update:2579)
    Step 7: 14/06/16 14:41:51 RESUMING SIM PROCEDURE 'update commit' type=hot ...
    Step 8: 14/06/16 15:18:34 COMPLETED SIM PROCEDURE 'update commit' type=hot
    Step 9: 14/06/16 15:31:35 BEGINNING SIM PROCEDURE 'update rollback' type=hot level=9999 ...
    Step 10: 14/06/16 15:47:34 SIM0091 PAUSE_REQUEST: (PROCEDURE) [PAUSE(CP_WARNING): Use 'sim --proc update --action resume' to continue...] (update_rlbk:421)
    Step 11: 14/06/16 15:53:30 RESUMING SIM PROCEDURE 'update rollback' type=hot level=9999 ...
    Step 12: 14/06/16 16:02:03 SIM0135 PAUSE_REQUEST: (PROCEDURE) [PAUSE(VERIFY_SOFTWARE): Use 'sim --proc update --action resume' to continue...] (update_rlbk:564)
    Step 13: 14/06/16 16:04:22 RESUMING SIM PROCEDURE 'update rollback' type=hot level=9999 ...
    Step 14: 14/06/16 16:09:42 RESUMING SIM PROCEDURE 'update rollback' type=hot level=9999 ...
    Step 15: 14/06/16 16:26:56 COMPLETED SIM PROCEDURE 'update rollback' type=hot level=9999
    
    3). sim --proc update --action apply to "CP_WARNING" 59 mins
    4). sim --proc update --action resume to  "VERIFY_SOFTWARE" 4 mins
    5). sim --proc update --action resume to  "COMMIT" 31 mins
    6). sim --proc update --action commit to end of Patch 36 mins
    8). Rollback from RXX to RXX 47 mins

     

    转载于:https://www.cnblogs.com/allenz/p/4755974.html

    展开全文
  • <div><p><code>Mono.block(Duration timeout)</code> currently throws <code>IllegalStateException</code> if the timeout expires. This seems odd as a) it isn't an illegal state, it's a perfectly ...
  • 获取video duration time

    千次阅读 2018-09-11 10:19:04
    console.log("video time", document.getElementById('videoDOM').duration); // video time NaN setTimeout(function() { console.log("video time", document.getElementById('videoDOM').duration)...
    <!DOCTYPE html>
    <html lang="en">
    
    	<head>
    		<meta charset="UTF-8">
    		<meta name="viewport" content="width=device-width, initial-scale=1.0">
    		<meta http-equiv="X-UA-Compatible" content="ie=edge">
    		<title>video</title>
    	</head>
    
    	<body>
    		<video id="videoDOM" style="width: 40%; height:40%" src="http://qiniu.jiusongjiankang.com/doctor/5b87c7255074b918917ebfc9.mp4" controls oncanplay="getTime(this)"></video>
    		<script>
    			function getTime(_this) {
    				console.log(parseInt(_this.duration)); // 101
    				console.log(formatTime(parseInt(_this.duration))); // 01:41
    			}
    
                            document.getElementById('videoDOM').ontimeupdate = function () {
    				// 视频已经播放时长
    				console.log(parseInt(this.currentTime));
    				console.log(parseInt(this.duration));
    			}
    			
    			// 设置视频播放时长
    			document.getElementById('videoDOM').currentTime = 5;
    
    			console.log("video time", document.getElementById('videoDOM').duration);
    			// video time NaN
    
    			setTimeout(function() {
    				console.log("video time", document.getElementById('videoDOM').duration);
    				// video time NaN
    			}, 200);
    
    			// 格式化时间函数
    			function formatTime(s) {
    				var t;
    				if(s > -1) {
    					var hour = Math.floor(s / 3600);
    					var min = Math.floor(s / 60) % 60;
    					var sec = s % 60;
    					if(hour < 0 || hour == 0) {
    						t = '';
    					} else if(0 < hour < 10) {
    						t = '0' + hour + ":";
    					} else {
    						t = hour + ":";
    					}
    
    					if(min < 10) {
    						t += "0";
    					}
    					t += min + ":";
    					if(sec < 10) {
    						t += "0";
    					}
    					t += sec;
    				}
    				return t;
    			}
    		</script>
    	</body>
    
    </html>

    在获取 video 总时长的时候,在 js 中获取 video 元素然后在获取 duration 是获取不到的,即使加一个延迟也还是获取不到。

    解决方法:

    在 video 标签身上加 oncanplay 方法,在这个方法中就可以获取到视频的时长了。

    展开全文
  • <div><p>I want Progress.Circle rotate slow. any one can help me?</p><p>该提问来源于开源项目:oblador/react-native-progress</p></div>
  • <p>The problem was if <code>foo</code> could never succeed, the exit code of loop was still zero so the work around was to drop the duration flag and use the <code>timeout</code> command like so: ...
  • 关于mysql的Fetch TimeDuration Time

    千次阅读 2016-11-22 09:42:00
    详见:...Stackowerflow 上关于这两个时间有人这样解释 Fetch time - measures how long transferring fetched results take, which has nothing to do with query execu...

    详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt411

    Stackowerflow 上关于这两个时间有人这样解释

    Fetch time - measures how long transferring fetched results take, which has nothing to do with query execution. I would not consider it as sql query debugging/optimization option since fetch time depends on network connection, which itself does not have anything to do with query optimization. If fetch time is bottleneck then more likely there's some networking problem.

    Note: fetch time may vary on each query execution.

    Duration time - is the time that query needs to be executed. You should try to minimize it when optimizing performance of sql query.

     

    其实说通俗一些,fetch time 就是数据在网络上传输花费的时间,duration time是sql真正执行的时间

    展开全文
  • Knowing database queries duration greatly helps to find problems in the code so it would be a very useful addition to npgsql logging (https://www.npgsql.org/doc/logging.html).</p><p>该提问来源于开源...
  • <ul><li>Added time measured on each installer step to logs</li></ul> <p><strong>Related issue(s)</strong></p> <h1>6322</h1><p>该提问来源于开源项目:kyma-project/kyma</p></div>
  • <div><p>What is the Max time out duration (min) if we deploy Azure Functions on Kubernetes with KEDA? <p>I read this ...
  • <div><p>Currently, when the system is reserved through the task /distribution/reservesys (which is the case by default) reserve_duration has no effect.</p><p>该提问来源于开源项目:CentOS-PaaS-...
  • <div><p>I got the strange phenomenon with RTMP streaming using Red5 ...t know why, but NetStream.time returns milliseconds instead of seconds when I did above according to my debugging. <p>Reference: ...
  • <div><p>the flied run_duration on dbo.sysjobhistory have format HHMMSS. but in plugin, you display the field as a number of minutes. <p>information source : ...sql-server-2017</p><p>该提问来源于开源项目&...
  • if (log_duration || log_min_duration_statement >= 0) { long secs; int usecs; int msecs; bool exceeded; TimestampDifference(GetCurrentStatementStartTimestamp(), GetCurrentTimestamp(), &secs, ...

    PostgreSQL 可以通过参数设置是否要记录SQL的执行时间,以及执行时间超过多少的SQL。
    注意这里的执行时间实际上包含了网络的传输时间。
    所以在遇到慢查询时,除了要排查数据库的问题,实际上还需要排查网络以及客户端的问题,因为客户端接收数据堵塞也会造成慢查询,就像我前天写的文章。
    PostgreSQL IDE pgadmin , edb postgres enterprise manager 查询慢的问题分析
    https://yq.aliyun.com/articles/32438

    另外需要指出的是,PostgreSQL的内核在这方面有改进的空间,最好是把网络传输的时间另外计算。
    这样更容易排查问题。
    如果要将网络时间另外计算,需要hack一下内核的postgres.c中的几个函数,文章后面会分析。

    测试
    在数据库中创建表和测试数据

    postgres=> create table tbl(id int);
    CREATE TABLE
    postgres=> insert into tbl select generate_series(1,200000);
    INSERT 0 200000
    postgres=> \dt+ tbl
                       List of relations
     Schema | Name | Type  | Owner |  Size   | Description 
    --------+------+-------+-------+---------+-------------
     public | tbl  | table | test  | 7104 kB | 
    (1 row)

    确保打开了慢查询的审计日志

    postgres=> show log_min_duration_statement ;
     log_min_duration_statement 
    ----------------------------
     1s
    (1 row)

    在数据库所在服务器的本地执行如下查询,很快就返回

    digoal@localhost-> date; psql -c "select * from tbl" >/dev/null ; date;
    Fri Apr 22 11:59:52 CST 2016
    Fri Apr 22 11:59:53 CST 2016

    开启一个比较慢的网络,例如手机的2G网络,然后通过手机上网连接到数据库,执行同样的SQL,耗时变长了,因为网络不稳定,时快时慢。

    digoal@digoal01-> date ; psql -h remote_host -p 1921 -U test postgres -c "select * from tbl" >/dev/null ; date;
    Fri Apr 22 12:31:08 CST 2016
    Fri Apr 22 12:31:18 CST 2016
    
    
    digoal@digoal01-> date ; psql -h remote_host -p 1921 -U test postgres -c "select * from tbl limit 20000" >/dev/null ; date;
    Fri Apr 22 12:34:30 CST 2016
    Fri Apr 22 12:34:47 CST 2016

    在数据库的日志中,可以看到慢查询的审计日志,耗时包含了SQL数据库将数据传输到客户端的时间。

    2016-04-22 12:33:13.112 CST,"test","postgres",2680,"36.16.129.195:11812",5719a97f.a78,3,"SELECT",2016-04-22 12:33:03 CST,7/0,0,LOG,00000,"duration: 8300.129 ms  statement: select * from tbl limit 20000",,,,,,,,"exec_simple_query, postgres.c:1149","psql"

    对应的代码
    src/backend/tcop/postgres.c

    check_log_duration
    检查是否需要输出duration。
    同时计算从语句时间开始到当前时间的一个时间差,也就是SQL的duration。
    有4个接口会记录时间
    exec_execute_message 使用绑定变量时, execute sql的时间
    exec_bind_message 使用绑定变量时, bind的时间
    exec_parse_message 使用绑定变量时, parse的时间
    exec_simple_query 未使用绑定变量时,执行SQL的时间

    这几个函数的代码如下

    /*
     * check_log_duration
     *        Determine whether current command's duration should be logged
     *
     * Returns:
     *        0 if no logging is needed, 不需要记录SQL时间
     *        1 if just the duration should be logged, 需要记录SQL时间, 但是不需要记录SQL详情
     *        2 if duration and query details should be logged, 需要记录SQL时间,同时需要记录SQL 详情
     *
     * If logging is needed, the duration in msec is formatted into msec_str[],
     * which must be a 32-byte buffer.
     *
     * was_logged should be TRUE if caller already logged query details (this
     * essentially prevents 2 from being returned).
     */
    int
    check_log_duration(char *msec_str, bool was_logged)
    {
        if (log_duration || log_min_duration_statement >= 0)
        {
            long        secs;
            int            usecs;
            int            msecs;
            bool        exceeded;
    
            TimestampDifference(GetCurrentStatementStartTimestamp(),
                                GetCurrentTimestamp(),
                                &secs, &usecs);  // 语句开始到当前的时间
            msecs = usecs / 1000;
    
            /*
             * This odd-looking test for log_min_duration_statement being exceeded
             * is designed to avoid integer overflow with very long durations:
             * don't compute secs * 1000 until we've verified it will fit in int.
             */
            exceeded = (log_min_duration_statement == 0 ||
                        (log_min_duration_statement > 0 &&
                         (secs > log_min_duration_statement / 1000 ||
                          secs * 1000 + msecs >= log_min_duration_statement)));
    
            if (exceeded || log_duration)
            {
                snprintf(msec_str, 32, "%ld.%03d",
                         secs * 1000 + msecs, usecs % 1000);
                if (exceeded && !was_logged)
                    return 2;
                else
                    return 1;
            }
        }
    
        return 0;
    }
    
    
    simple exec
    /*
     * exec_simple_query
     *
     * Execute a "simple Query" protocol message.
     */
    static void
    exec_simple_query(const char *query_string)
    {
        CommandDest dest = whereToSendOutput;
        MemoryContext oldcontext;
        List       *parsetree_list;
        ListCell   *parsetree_item;
        bool        save_log_statement_stats = log_statement_stats;
        bool        was_logged = false;
        bool        isTopLevel;
        char        msec_str[32];
    ...
            /*
             * Create unnamed portal to run the query or queries in. If there
             * already is one, silently drop it.
             */
            portal = CreatePortal("", true, true);
            /* Don't display the portal in pg_cursors */
            portal->visible = false;
    
            /*
             * We don't have to copy anything into the portal, because everything
             * we are passing here is in MessageContext, which will outlive the
             * portal anyway.
             */
            PortalDefineQuery(portal,
                              NULL,
                              query_string,
                              commandTag,
                              plantree_list,
                              NULL);
    
            /*
             * Start the portal.  No parameters here.
             */
            PortalStart(portal, NULL, 0, InvalidSnapshot);
    
            /*
             * Select the appropriate output format: text unless we are doing a
             * FETCH from a binary cursor.  (Pretty grotty to have to do this here
             * --- but it avoids grottiness in other places.  Ah, the joys of
             * backward compatibility...)
             */
            format = 0;                /* TEXT is default */
            if (IsA(parsetree, FetchStmt))
            {
                FetchStmt  *stmt = (FetchStmt *) parsetree;
    
                if (!stmt->ismove)
                {
                    Portal        fportal = GetPortalByName(stmt->portalname);
    
                    if (PortalIsValid(fportal) &&
                        (fportal->cursorOptions & CURSOR_OPT_BINARY))
                        format = 1; /* BINARY */
                }
            }
            PortalSetResultFormat(portal, 1, &format);
    
            /*
             * Now we can create the destination receiver object.
             */
            receiver = CreateDestReceiver(dest);
            if (dest == DestRemote)
                SetRemoteDestReceiverParams(receiver, portal);
    
            /*
             * Switch back to transaction context for execution.
             */
            MemoryContextSwitchTo(oldcontext);
    
            /*
             * Run the portal to completion, and then drop it (and the receiver).
             */
            (void) PortalRun(portal,
                             FETCH_ALL,
                             isTopLevel,
                             receiver,
                             receiver,
                             completionTag);
    
            (*receiver->rDestroy) (receiver);
    
            PortalDrop(portal, false);
    
            if (IsA(parsetree, TransactionStmt))
            {
                /*
                 * If this was a transaction control statement, commit it. We will
                 * start a new xact command for the next command (if any).
                 */
                finish_xact_command();
            }
    ...
        /*
         * Close down transaction statement, if one is open.
         */
        finish_xact_command();
    
        /*
         * If there were no parsetrees, return EmptyQueryResponse message.
         */
        if (!parsetree_list)
            NullCommand(dest);
    
        /*
         * Emit duration logging if appropriate.
         */
        switch (check_log_duration(msec_str, was_logged))
        {
            case 1:
                ereport(LOG,
                        (errmsg("duration: %s ms", msec_str),
                         errhidestmt(true)));
                break;
            case 2:
                ereport(LOG,
                        (errmsg("duration: %s ms  statement: %s",
                                msec_str, query_string),
                         errhidestmt(true),
                         errdetail_execute(parsetree_list)));
                break;
        }
    
        if (save_log_statement_stats)
            ShowUsage("QUERY STATISTICS");
    
        TRACE_POSTGRESQL_QUERY_DONE(query_string);
    
        debug_query_string = NULL;
    }
    
    
    
    
    parse
    /*
     * exec_parse_message
     *
     * Execute a "Parse" protocol message.
     */
    static void
    exec_parse_message(const char *query_string,    /* string to execute */
                       const char *stmt_name,        /* name for prepared stmt */
                       Oid *paramTypes,        /* parameter types */
                       int numParams)        /* number of parameters */
    {
        MemoryContext unnamed_stmt_context = NULL;
        MemoryContext oldcontext;
        List       *parsetree_list;
        Node       *raw_parse_tree;
        const char *commandTag;
        List       *querytree_list;
        CachedPlanSource *psrc;
        bool        is_named;
        bool        save_log_statement_stats = log_statement_stats;
        char        msec_str[32];
    ...
        /*
         * Send ParseComplete.
         */
        if (whereToSendOutput == DestRemote)
            pq_putemptymessage('1');
    
        /*
         * Emit duration logging if appropriate.
         */
        switch (check_log_duration(msec_str, false))
        {
            case 1:
                ereport(LOG,
                        (errmsg("duration: %s ms", msec_str),
                         errhidestmt(true)));
                break;
            case 2:
                ereport(LOG,
                        (errmsg("duration: %s ms  parse %s: %s",
                                msec_str,
                                *stmt_name ? stmt_name : "<unnamed>",
                                query_string),
                         errhidestmt(true)));
                break;
        }
    
        if (save_log_statement_stats)
            ShowUsage("PARSE MESSAGE STATISTICS");
    
        debug_query_string = NULL;
    }
    
    
    
    
    bind
    /*
     * exec_bind_message
     *
     * Process a "Bind" message to create a portal from a prepared statement
     */
    static void
    exec_bind_message(StringInfo input_message)
    {
        const char *portal_name;
        const char *stmt_name;
        int            numPFormats;
        int16       *pformats = NULL;
        int            numParams;
        int            numRFormats;
        int16       *rformats = NULL;
        CachedPlanSource *psrc;
        CachedPlan *cplan;
        Portal        portal;
        char       *query_string;
        char       *saved_stmt_name;
        ParamListInfo params;
        MemoryContext oldContext;
        bool        save_log_statement_stats = log_statement_stats;
        bool        snapshot_set = false;
        char        msec_str[32];
    ...
        /*
         * Now we can define the portal.
         *
         * DO NOT put any code that could possibly throw an error between the
         * above GetCachedPlan call and here.
         */
        PortalDefineQuery(portal,
                          saved_stmt_name,
                          query_string,
                          psrc->commandTag,
                          cplan->stmt_list,
                          cplan);
    
        /* Done with the snapshot used for parameter I/O and parsing/planning */
        if (snapshot_set)
            PopActiveSnapshot();
    
        /*
         * And we're ready to start portal execution.
         */
        PortalStart(portal, params, 0, InvalidSnapshot);
    
        /*
         * Apply the result format requests to the portal.
         */
        PortalSetResultFormat(portal, numRFormats, rformats);
    
        /*
         * Send BindComplete.
         */
        if (whereToSendOutput == DestRemote)
            pq_putemptymessage('2');
    
        /*
         * Emit duration logging if appropriate.
         */
        switch (check_log_duration(msec_str, false))
        {
            case 1:
                ereport(LOG,
                        (errmsg("duration: %s ms", msec_str),
                         errhidestmt(true)));
                break;
            case 2:
                ereport(LOG,
                        (errmsg("duration: %s ms  bind %s%s%s: %s",
                                msec_str,
                                *stmt_name ? stmt_name : "<unnamed>",
                                *portal_name ? "/" : "",
                                *portal_name ? portal_name : "",
                                psrc->query_string),
                         errhidestmt(true),
                         errdetail_params(params)));
                break;
        }
    
        if (save_log_statement_stats)
            ShowUsage("BIND MESSAGE STATISTICS");
    
        debug_query_string = NULL;
    }
    
    
    
    execute
    
    
    
    /*
     * exec_execute_message
     *
     * Process an "Execute" message for a portal
     */
    static void
    exec_execute_message(const char *portal_name, long max_rows)
    {
        CommandDest dest;
        DestReceiver *receiver;
        Portal        portal;
        bool        completed;
        char        completionTag[COMPLETION_TAG_BUFSIZE];
        const char *sourceText;
        const char *prepStmtName;
        ParamListInfo portalParams;
        bool        save_log_statement_stats = log_statement_stats;
        bool        is_xact_command;
        bool        execute_is_fetch;
        bool        was_logged = false;
        char        msec_str[32];
    
    ...
        /*
         * Okay to run the portal.
         */
        if (max_rows <= 0)
            max_rows = FETCH_ALL;
    
        completed = PortalRun(portal,
                              max_rows,
                              true, /* always top level */
                              receiver,
                              receiver,
                              completionTag);
    
        (*receiver->rDestroy) (receiver);
    
        if (completed)
        {
            if (is_xact_command)
            {
                /*
                 * If this was a transaction control statement, commit it.  We
                 * will start a new xact command for the next command (if any).
                 */
                finish_xact_command();
            }
            else
            {
                /*
                 * We need a CommandCounterIncrement after every query, except
                 * those that start or end a transaction block.
                 */
                CommandCounterIncrement();
            }
    
            /* Send appropriate CommandComplete to client */
            EndCommand(completionTag, dest);
        }
        else
        {
            /* Portal run not complete, so send PortalSuspended */
            if (whereToSendOutput == DestRemote)
                pq_putemptymessage('s');
        }
    
        /*
         * Emit duration logging if appropriate.
         */
        switch (check_log_duration(msec_str, was_logged))
        {
            case 1:
                ereport(LOG,
                        (errmsg("duration: %s ms", msec_str),
                         errhidestmt(true)));
                break;
            case 2:
                ereport(LOG,
                        (errmsg("duration: %s ms  %s %s%s%s: %s",
                                msec_str,
                                execute_is_fetch ?
                                _("execute fetch from") :
                                _("execute"),
                                prepStmtName,
                                *portal_name ? "/" : "",
                                *portal_name ? portal_name : "",
                                sourceText),
                         errhidestmt(true),
                         errdetail_params(portalParams)));
                break;
        }
    
        if (save_log_statement_stats)
            ShowUsage("EXECUTE MESSAGE STATISTICS");
    
        debug_query_string = NULL;
    }
    展开全文
  • <div><p>Backport of https://github.com/hazelcast/hazelcast/pull/8206</p><p>该提问来源于开源项目:hazelcast/hazelcast</p></div>
  • I am instead getting VTT Cues at 40 secs for 40 secs duration. I am not sure how this cue start and duration are picked up from.## Sources Is a certain source or a certain segment affected? please ...
  • Time Duration

    2020-12-01 16:06:41
    <div><p>How can I set a custom time duration. </p><p>该提问来源于开源项目:zjfjack/JZCalendarWeekView</p></div>
  • if duration time is greater than 9 minutes, for example 10 minutes, during second and every next record, current time and duration is blinking weird <h2>Steps to reproduce <p>set maxLength: 600 make ...
  • time.Duration to NtpTime

    2020-12-26 20:21:05
    <div><p>Any chance for you to add the reverse function of (t ntpTimeShort) Duration() time.Duration? <p>like a toNtpTime(t time.Duration) NtpTime function? <p>I can't figure the formula myself. ...
  • I feel worthwhile to be able to get the duration time of the job. <strong>What you expected to happen</strong>: For example, by continuously monitoring the duration time of jobs generated from Cronjob...
  • time.Time and time.Duration

    2021-01-11 00:43:30
    <div><p>This development is happening in the <code>std</code> branch.</p><p>该提问来源于开源项目:gogo/protobuf</p></div>

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 15,022
精华内容 6,008
关键字:

durationtime