惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - 以天

用DTS从Excel中往SQL SERVER导入数据的问题 - 以天 - 博客园 [AS3]DispatchEvent的古怪问题 FLASH的安全策略,PNG/XML HttpHandle中间的Session的使用 与 web.config中HttpModel 用Eclipse+CDT+MinGW+SVN搭建跨平台的开发环境 - 以天 - 博客园 C++和.net的对象创建 让你的WCF服务支持WebGet属性 - 以天 - 博客园 QC9的安装心得 AS3中的Timer和Event.EnterFrame的区别 XFile中的UV坐标(Panda Xfile导出)的坐标系和3dMax的坐标系不对 [AS]Sprite的buttonMode带来的问题 [Flash]FMS发布live视频时会出现第一次发布不成功 [Flash]Flash在网页中不能适应用户显示/影藏IE的状态栏时改变舞台大小 [C#]10进制到Excel的26进制的转换函数 [其他]水晶报表中的人民币大写函数 [JS]关于Js文件的导入, [AS3]使用LoadInfo的addEventListener时一定要注意结束时调用removeEventListener 各行业的龙头股 (整理) [AS3]单个图片进行角色动作化处理【转】
[WCF]今天做了一个WCF的测试,测试的结果让我很出乎意料,但百思不得其解啊。
以天 · 2008-06-05 · via 博客园 - 以天

[TestMethod]
        
public void TestWCF()
        {
            RService.PlayerServiceClient client = 
new Remoting.Test.RService.PlayerServiceClient();

            
for (int i = 0; i < 10; i++)
            {
                client.Login(
"xxxx@hotmail.com""xxxxxxxxxxxxxxxx");
            }
        }


        [TestMethod]
        
public void TestDirectAccess()
        {
            
for (int i = 0; i < 10; i++)
            {
                player.Login(
"xxxx@hotmail.com""xxxxxxxxxxxxxxxxx");
            }
        }


PlayerService.Login的代码为

public Remoting.Contract.Data.PlayerInfo Login(string username, string password)
        {
            
using (Player player = new Player())
            {
                
return player.Login(username, password);
            }
        }

TestDirectAccess相当于直接调用这段代码。数据库在另外一台电脑上,其他的所有程序运行在同一电脑,10次反复测试结果如下

后来我在TestDirectAccess和 TestWcf后面加了几个同样的函数,视乎看出了问题处理,主要时间还是消耗在数据库的连接创建上。