首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Reporting Services 2008 R2中使用p4.net

在Reporting Services 2008 R2中使用p4.net
EN

Stack Overflow用户
提问于 2011-06-29 00:30:16
回答 2查看 203关注 0票数 1

我正在使用MS SQL Server Reporting Services2008 R2生成报表。

我有Perforce数据库,我在其中查询变更集数据并将其放入报告中。我需要从Perforce数据库获取代码统计信息,但Perforce数据库没有此信息。

因此,我编写了一个自定义DLL来获取特定变更集中更改的代码数量。然后,我创建了一个计算字段,并调用了计算更改代码行数并传递变更集编号的方法。

它起作用了..。然而,它是愚蠢的缓慢...我无法理解它为什么如此慢,因为从性能的角度来看,使用p4.net的自定义dll上的代码计算是非常便宜的工作。

我知道这是非常具体的情况,但是你们能告诉我如何找到导致速度缓慢的原因吗?

非常感谢您的帮助,请提出任何问题以澄清。

干杯

AnarchistGeek

EN

回答 2

Stack Overflow用户

发布于 2011-06-29 22:07:11

您能否确定时间主要花在describe命令还是diff2命令上?如果使用P4toDb复制元数据,则可以通过从关系数据库读取数据来优化describe部分。

票数 1
EN

Stack Overflow用户

发布于 2011-07-01 01:15:45

我的一个建议是预先计算更改大小,并将它们存储在文件修订的属性中。您可以使用未记录的p4 attribute命令。

代码语言:javascript
复制
PS> p4 help undoc

    attribute -- Set per-revision attributes on revisions (unsupported)

    p4 attribute [ -e -f -p ] -n name [ -v value ] files...

        Sets a user-managed attribute 'name' to 'value' on opened files.
        If -v isn't given the attribute is cleared (if set).

        Attributes can only be viewed with 'p4 fstat'.

        The -e flag indicates the 'value' is in hex.

        The -f flag sets the attribute on submitted files.

        The -p flag creates an attribute whose value will be propagated
        when the file is opened with 'p4 add', 'p4 edit', or 'p4 delete'.

PS> p4 help undoc

    Unsupported or obsolete Perforce commands and options:
...

    p4 fstat [ -Oacedhiz ] [ -A pattern ]
        The -Oa flag shows attributes set by 'p4 attribute'.  The -Oae flag
        shows the attribute values encoded as hex.  The -Od flag outputs the
        digest of the attribute.  The -Oc flag outputs the path, revision and
        type of the server archive file (requires 'admin' privilege). The
        -Oz flag outputs the path and revision of any lazy copies (requires
        'admin' privilege).  The -Oh flag outputs the size, digest and any
        selected attributes of the synced revision rather than the head
        revision. The -Oi flag outputs extra (debugging) information about
        the attributes.  The -A pattern flag restricts attributes to those
        matching 'pattern'.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6509853

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档