Skip to content

Instantly share code, notes, and snippets.

View sebastienros's full-sized avatar

Sébastien Ros sebastienros

View GitHub Profile
@sebastienros
sebastienros / Program.cs
Created August 15, 2019 02:41
Sorting unicode text with lucene
using ICU4N.Text;
using Lucene.Net.Analysis.Fr;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Analysis.TokenAttributes;
using Lucene.Net.Collation;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Search;
using Lucene.Net.Store;
--server "http://172.16.228.83:5001" --client "http://172.16.228.82:5002"
--jobs https://raw.githubusercontent.com/aspnet/benchmarks/dev/src/Benchmarks/benchmarks.plaintext.json -n Plaintext --duration 15 --warmup 15 --collect-crossgen
@sebastienros
sebastienros / Benchmarking.md
Last active March 31, 2018 15:30
Benchmarking notes

Benchmarking

Components

The benchmarking infrastructure is made of these components:

  • Benchmarks, a web application that contains different scenarios to benchmark.
  • BenchmarksServer, a web application that queues jobs that are able to run custom web applications to be benchmarked.
  • BenchmarksClient, a web application that queues jobs that can create custom client loads on a web application.
  • BenchmarksDriver, a command-line application that can enqueue server and client jobs and displays the results locally.
  • A database server that can run any or all of PostgreSql, Sql Server, MySql, MongoDb
@sebastienros
sebastienros / highh5.txt
Last active October 20, 2017 22:34
High5 benchmarks results
Lhc: 34 KB
NodeJsOrg: 8 KB
NpmOrg: 11 KB
HugePage: 894 KB
## High5
Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---------- |-------------:|------------:|------------:|-----------:|----------:|----------:|------------:|
Lhc | 4,995.6 us | 95.86 us | 98.45 us | 1968.7500 | 226.5625 | - | 12114.27 KB |
@sebastienros
sebastienros / PortableObject-NETCore.md
Last active September 27, 2023 01:01
Configuring Portable Object localization in ASP.NET Core

Configuring Portable Object localization in ASP.NET Core

The package which is used in this article is avaible on MyGet on this url: https://www.myget.org/F/orchardcore-preview/api/v3/index.json

This article walks you through the steps for using Portable Object files (PO files) inside your ASP.NET Core application.

What is a PO file

PO files are files that contain the translated strings for a given language. They reveal very useful as contrary to standard resx files, PO files support pluralization and are distributed as text files.

using LightningDB;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using YesSql.Core.Storage;
namespace YesSql.Storage.LightningDB
@sebastienros
sebastienros / Ticks.cs
Created November 17, 2015 00:43
Ticks performance
using System;
public class Program
{
public static void Main()
{
var iterations = 1000000;
var sw = new System.Diagnostics.Stopwatch();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using Orchard.ContentManagement;
using Orchard.Indexing;
namespace Attendees.Controllers
{
public class SearchController : Controller