コード例 #1
0
ファイル: median_filter.cpp プロジェクト: HunterChen/redis3m
void median_filter::add_sample(connection::ptr_t connection, const std::string &tag, double value)
{
  connection->append(command("MULTI"));
  connection->append(command("LPUSH") << list_key(tag) << value );
  connection->append(command("LTRIM") << list_key(tag) << 0 << _samples-1 );
  connection->append(command("EXEC"));
  connection->get_replies(4);
}