/// <summary>
 /// GetHistograms 接口查询指定的 Project 下某个 Logstore 中日志的分布情况。还可以通过指定相关参数仅查询符合指定条件的日志分布情况。
 /// 当日志写入到 logstore 中,日志服务的查询接口(GetHistograms 和 GetLogs)能够查到该日志的延时因写入日志类型不同而异。日志服务按日志时间戳把日志分为如下两类:
 /// <list type="bullet">
 ///   <item><description>实时数据:日志中时间点为服务器当前时间点 (-180秒,900秒]。例如,日志时间为 UTC 2014-09-25 12:03:00,服务器收到时为 UTC 2014-09-25 12:05:00,则该日志被作为实时数据处理,一般出现在正常场景下。</description></item>
 ///   <item><description>历史数据:日志中时间点为服务器当前时间点 [-7 x 86400秒, -180秒)。例如,日志时间为 UTC 2014-09-25 12:00:00,服务器收到时为 UTC 2014-09-25 12:05:00,则该日志被作为历史数据处理,一般出现在补数据场景下。</description></item>
 /// </list>
 ///
 /// 其中,实时数据写入至可查询的延时为3秒。
 /// </summary>
 /// <param name="client">client实例。</param>
 /// <param name="logstorename">需要查询日志的 Logstore 名称。</param>
 /// <param name="from">查询开始时间点(精度为秒,从 1970-1-1 00:00:00 UTC 计算起的秒数)。</param>
 /// <param name="to">查询结束时间点(精度为秒,从 1970-1-1 00:00:00 UTC 计算起的秒数)。</param>
 /// <param name="topic">查询日志主题。</param>
 /// <param name="query">查询表达式。关于查询表达式的详细语法,请参考 查询语法。</param>
 /// <param name="project">项目名,此参数将覆盖 client 中默认设置。</param>
 /// <returns>异步响应结果。</returns>
 /// <seealso cref="ILogServiceClient.GetHistogramsAsync"/>
 public static Task <IResponse <GetLogHistogramsResult> > GetHistogramsAsync(this ILogServiceClient client,
                                                                             String logstorename, DateTimeOffset from, DateTimeOffset to,
                                                                             String topic = null, String query = null, String project = null)
 => client.GetHistogramsAsync(new GetLogHistogramsRequest(logstorename, (Int32)from.ToUnixTimeSeconds(), (Int32)to.ToUnixTimeSeconds())
 {
     Topic       = topic,
     Query       = query,
     ProjectName = project
 });