小编mad*_*dev的帖子

dotnet核心WebAPI的性能测试

我想知道是否有任何工具值得尝试在高负载期间测试dotnet核心WebAPI性能.

在过去,我使用jMeter过Apache,但配置与TeamCity和dotnet核心版本一起使用有点痛苦.

我正在寻找可以提供统计数据的东西,因此如果最近的变化有或没有降低性能等,自动运行测试可以给我信息.

我也做了一个快速的谷歌,VisualStudio有一些东西,但首先它需要企业版的软件,我不相信该工具是否足够好.

谢谢

performance-testing asp.net-core-webapi

6
推荐指数
1
解决办法
220
查看次数

在数据库中更新时未保存嵌套的拥有者类型

我有以下课程:

订购:

public class Order {
  private Order()
  {
      //some code to initialise object
  }
  //more properties
  public Prepayment Prepayment { get; private set; }
  //more methods and properties
}
Run Code Online (Sandbox Code Playgroud)

预付款:

public class Prepayment:ValueObject<Prepayment>
{
    private Prepayment()
    {   
    }

    public Money AmountPrepaid { get; private set; }
    public bool HasPrepaymentBeenTaken => AmountPrepaid.Amount > 0;
}
Run Code Online (Sandbox Code Playgroud)

钱:

public class Money {
        private Money()
        {
        }
        private Money(decimal amount)
        : this()
        {
            Amount = amount;
        }
        public decimal Amount { get; private …
Run Code Online (Sandbox Code Playgroud)

c# ef-core-2.2

5
推荐指数
1
解决办法
571
查看次数

无法将json转换为xml

我试图将json字符串转换为xml 1)我的json是

[  
       {  
          "QuizTitle":"asdf",
          "QuizImage":"",
          "QuizCategory":"0",
          "QuizTags":"asdf",
          "question":[  
             [  
                {  
                   "QuestionType":"1",
                   "QuestionTitle":"asdf",
                   "questionOption":[  
                      {  
                         "QuestionOptionValue":"sdf",
                         "QuestionOptionIsRight":"0"
                      },
                      {  
                         "QuestionOptionValue":"asdf",
                         "QuestionOptionIsRight":"1"
                      }
                   ]
                }
             ],
             [  
                {  
                   "QuestionType":"2",
                   "QuestionTitle":"sdfdsf",
                   "questionOption":[  
                      {  
                         "QuestionOptionValue":"asdf",
                         "QuestionOptionIsRight":"0"
                      },
                      {  
                         "QuestionOptionValue":"asdf",
                         "QuestionOptionIsRight":"1"
                      }
                   ]
                }
             ]
          ]
       }
    ]
Run Code Online (Sandbox Code Playgroud)

2)我的c#代码是

XmlDocument doc = JsonConvert.DeserializeXmlNode(str);
Run Code Online (Sandbox Code Playgroud)

获得以下错误:

错误: - XmlNodeConverter只能转换以对象开头的JSON.

我想小编辑在json类似remove []的问题元素.但没有奏效.

c# xml json

4
推荐指数
1
解决办法
5965
查看次数

RabbitMQ badmatch错误

我有RabbitMQ实例来处理消息.我注意到,由于某些原因,Rabbit停止向消费者发送消息,因为队列不断增长,最终系统中的磁盘空间非常小.

我能够在兔子的日志文件中找到以下信息:

** Reason for termination == 
** {{badmatch,{error,enospc}},
    [{rabbit_msg_store,terminate,2,
                       [{file,"src/rabbit_msg_store.erl"},{line,975}]},
     {gen_server2,terminate,3,[{file,"src/gen_server2.erl"},{line,1146}]},
     {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,250}]}]}
** In 'terminate' callback with reason ==
** {{badmatch,{error,enospc}},
    [{rabbit_msg_store,write_message,3,
                       [{file,"src/rabbit_msg_store.erl"},{line,1160}]},
     {rabbit_msg_store,handle_cast,2,
                       [{file,"src/rabbit_msg_store.erl"},{line,881}]},
     {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1049}]},
     {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,250}]}]}
Run Code Online (Sandbox Code Playgroud)

你们有没有人遇到这样的问题?兔子试图告诉我的任何帮助或信息将不胜感激.

谢谢.

rabbitmq

1
推荐指数
1
解决办法
1314
查看次数