mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add performance test
This commit is contained in:
parent
f8190f25c6
commit
2b2add7e5a
@ -63,6 +63,20 @@ namespace OrmTest
|
|||||||
//Delete
|
//Delete
|
||||||
//删除
|
//删除
|
||||||
db.Deleteable(userInfo).ExecuteCommand();
|
db.Deleteable(userInfo).ExecuteCommand();
|
||||||
|
|
||||||
|
//Test the performance of creating SQL
|
||||||
|
for (int i = 0; i < 10000; i++)
|
||||||
|
{
|
||||||
|
db.Insertable(new UserInfo001()
|
||||||
|
{
|
||||||
|
Context = "Context",
|
||||||
|
Email = "dfafa@qq.com",
|
||||||
|
Price = Convert.ToDecimal(1.1),
|
||||||
|
UserName = "admin",
|
||||||
|
RegistrationDate = DateTime.Now,
|
||||||
|
|
||||||
|
}).ToSql();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -180,6 +180,23 @@ CACHEMODEL 'both'");//不支持 UPDATE 1 选项
|
|||||||
}).AS("fc_data01").ExecuteCommand();
|
}).AS("fc_data01").ExecuteCommand();
|
||||||
|
|
||||||
var list2 = db.Queryable<fc_data>().AS("fc_data01").ToList();
|
var list2 = db.Queryable<fc_data>().AS("fc_data01").ToList();
|
||||||
|
|
||||||
|
//Test the performance of creating SQL
|
||||||
|
for (int i = 0; i < 10000; i++)
|
||||||
|
{
|
||||||
|
db.Insertable(new fc_data()
|
||||||
|
{
|
||||||
|
data_id = 1,
|
||||||
|
gateway_mac = "mac",
|
||||||
|
rssi = 11,
|
||||||
|
ruminate = 1,
|
||||||
|
speed_hex = "x",
|
||||||
|
temperature = 1,
|
||||||
|
upload_time = DateTime.Now,
|
||||||
|
voltage = 1
|
||||||
|
|
||||||
|
}).ToSql();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user