Codebasis als Dateien ins Arbeitsrepo statt als Gitlink

QuellCode/CentronERP war nur als Gitlink (Submodul-Referenz auf 79c1142)
getrackt, ohne .gitmodules und ohne erreichbares Remote. Der
Untersuchungsgegenstand der Versuchsreihe war damit nicht reproduzierbar
gesichert: Ein Klon haette ein leeres Verzeichnis erhalten, und die Belege
der 3.287 Anforderungen waeren nicht ueberpruefbar gewesen.

Umstellung:
- Historie nach c:\DEV\CentronERP_git_snapshot_79c1142 ausgelagert
  (vollstaendig lesbar, enthaelt 79c1142 und Vorgaenger 89ccfd6)
- Gitlink aus dem Index entfernt
- Dateiinhalt aufgenommen: 24.557 Dateien, rund 333 MB

Die verschachtelte .gitignore der Codebasis gilt weiter, Build-Artefakte
bleiben ausgeschlossen. Details in Versuche/Versuch_01/_Codebasis-Nachweis.md
This commit is contained in:
Christoph Schwörer
2026-08-26 07:43:51 +02:00
parent 18edae75b6
commit f045b99a25
24664 changed files with 5846716 additions and 1 deletions
@@ -0,0 +1,15 @@
{
Input: 'Hallo Welt ich bin ein normaler text für Computer c-entron software gmbh',
Terms: [
'hallo',
'wel',
'normal',
'tex',
'compu',
'c-entron',
'centro',
'entro',
'softwar',
'gmbh'
]
}
@@ -0,0 +1,9 @@
{
Input: 'haefele@c-entron.de',
Terms: [
'haefele@c-entron.de',
'haefelecentro',
'haefel',
'entro'
]
}
@@ -0,0 +1,11 @@
{
Input: 'https://c-entron.de/something/todo',
Terms: [
'https://c-entron.de/something/todo',
'httpscentrondesomethingtodo',
'http',
'entro',
'something',
'todo'
]
}
@@ -0,0 +1,26 @@
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.IndexSearch.IndexBuilder;
public class IndexBuilderTests : CentronTest
{
public IndexBuilderTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
[Theory]
[InlineData(1, "Hallo Welt ich bin ein normaler text für Computer c-entron software gmbh")]
[InlineData(2, "haefele@c-entron.de")]
[InlineData(3, "https://c-entron.de/something/todo")]
public void RunTest(int step, string input)
{
var builder = new BusinessLogic.IndexSearch.IndexBuilder();
builder.Add(input);
var terms = builder.GetTerms();
this.Verifier.Verify($"{step}_Output", new { Input = input, Terms = terms });
}
}
@@ -0,0 +1,92 @@
using System.Diagnostics;
using System.Linq;
using System.Text.RegularExpressions;
using Centron.BusinessLogic.Administration.Settings;
using Centron.BusinessLogic.IndexSearch;
using Centron.BusinessLogic.Sales.Support;
using Centron.BusinessLogic.WebServices.Sales.Support;
using Centron.DAO.AdoNETDataAccess;
using Centron.Data.Entities.Sales.Support;
using Centron.Interfaces.BL;
using Centron.Tests.EndToEnd.Infrastructure;
using Xunit.Abstractions;
namespace Centron.Tests.EndToEnd.Tests.IndexSearch;
public class IndexSearchTests : EndToEndTest
{
public IndexSearchTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
public override void Execute()
{
// First, index everything
this.WithSession(s => s.GetBL<IndexSearchBL>().UpdateAllIndexes(default));
this.Verifier.VerifySql("Index_Count", "SELECT Count = COUNT(*) FROM dbo.ObjectFulltextIndex");
this.Verifier.VerifySql("IndexStats_Count", "SELECT Count = COUNT(*) FROM dbo.ObjectFulltextIndexStats");
// Remove a ticket (it should get removed from the index)
this.Sql("DELETE FROM dbo.hlpdsk_requests WHERE I3D = 10");
// Set one ticket to "update requested"
this.UpdateTicket();
// Now, update all indexes again
var sqlStatements = SqlDiagnosticObserver.Start(() =>
{
this.WithSession(s => s.GetBL<IndexSearchBL>().UpdateAllIndexes(default));
});
this.Verifier.Verify("Statements", sqlStatements.Select(f => NormalizeSqlAliasNumbers(f.CommandText)));
// Try querying something
var result = this.WithSession(s => s.GetBL<IndexSearchBL>().SearchIndex("gmbh ve"));
this.Verifier.Verify("Search_Result", result.Select(f => new { Kind = f.Kind, ObjectI3D = f.ObjectI3D, }).Distinct().OrderBy(f => f.ObjectI3D));
// Query tickets
this.QueryTickets();
}
private void UpdateTicket()
{
var ticket = this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().GetHelpdeskByI3D(11, this.GetLoggedInUser())).ThrowIfError();
this.WithSession(s => s.GetBL<HelpdeskWebServiceBL>().SaveHelpdesk(ticket, this.GetLoggedInUser()));
}
private static string NormalizeSqlAliasNumbers(string sqlStatement)
{
return Regex.Replace(sqlStatement, @"\b([A-Za-z][A-Za-z0-9]*\d+)_\d+_", "$1_alias_");
}
private void QueryTickets()
{
var filter = new HelpdeskFilter
{
SearchText = "Dell telefoniert",
};
for (int i = 1; i <= 100; i++)
{
// Enable fulltext-search
var settings2 = this.WithSession(s => s.GetBL<AppSettingsGroupBL>().GetFulltextIndexServiceSettings());
settings2.IsFulltextIndexServiceActive = true;
this.WithSession(s => s.GetBL<AppSettingsGroupBL>().UpdateFulltextIndexServiceSettings(settings2));
var indexSearchWatch = Stopwatch.StartNew();
var indexSearchTickets = this.WithSession(s => s.GetBL<HelpdeskSearchWebServiceBL>().GetHelpdesksThroughPaging(filter, HelpdeskSort.Number, true, 1, int.MaxValue, this.GetLoggedInUser()));
indexSearchWatch.Stop();
// Disable fulltext-search
var settings1 = this.WithSession(s => s.GetBL<AppSettingsGroupBL>().GetFulltextIndexServiceSettings());
settings1.IsFulltextIndexServiceActive = false;
this.WithSession(s => s.GetBL<AppSettingsGroupBL>().UpdateFulltextIndexServiceSettings(settings1));
var oldSearchWatch = Stopwatch.StartNew();
var oldSearchTickets = this.WithSession(s => s.GetBL<HelpdeskSearchWebServiceBL>().GetHelpdesksThroughPaging(filter, HelpdeskSort.Number, true, 1, int.MaxValue, this.GetLoggedInUser()));
oldSearchWatch.Stop();
this.TestOutputHelper.WriteLine($"Run {i}: {(oldSearchWatch.Elapsed < indexSearchWatch.Elapsed ? "old" : "new")}");
}
}
}
@@ -0,0 +1,5 @@
[
{
Count: '22710'
}
]
@@ -0,0 +1,366 @@
[
{
Kind: 7600071,
ObjectI3D: 1
},
{
Kind: 7600071,
ObjectI3D: 19
},
{
Kind: 10,
ObjectI3D: 27
},
{
Kind: 10,
ObjectI3D: 43
},
{
Kind: 10,
ObjectI3D: 56
},
{
Kind: 10,
ObjectI3D: 72
},
{
Kind: 10,
ObjectI3D: 74
},
{
Kind: 10,
ObjectI3D: 76
},
{
Kind: 10,
ObjectI3D: 84
},
{
Kind: 10,
ObjectI3D: 103
},
{
Kind: 10,
ObjectI3D: 106
},
{
Kind: 10,
ObjectI3D: 135
},
{
Kind: 10,
ObjectI3D: 136
},
{
Kind: 10,
ObjectI3D: 145
},
{
Kind: 10,
ObjectI3D: 158
},
{
Kind: 10,
ObjectI3D: 167
},
{
Kind: 10,
ObjectI3D: 176
},
{
Kind: 10,
ObjectI3D: 178
},
{
Kind: 10,
ObjectI3D: 208
},
{
Kind: 7600071,
ObjectI3D: 1029
},
{
Kind: 7600071,
ObjectI3D: 1033
},
{
Kind: 10,
ObjectI3D: 1210
},
{
Kind: 10,
ObjectI3D: 1215
},
{
Kind: 10,
ObjectI3D: 1223
},
{
Kind: 10,
ObjectI3D: 1240
},
{
Kind: 10,
ObjectI3D: 1248
},
{
Kind: 10,
ObjectI3D: 1251
},
{
Kind: 10,
ObjectI3D: 1252
},
{
Kind: 10,
ObjectI3D: 1253
},
{
Kind: 10,
ObjectI3D: 1258
},
{
Kind: 10,
ObjectI3D: 1266
},
{
Kind: 10,
ObjectI3D: 1275
},
{
Kind: 10,
ObjectI3D: 1277
},
{
Kind: 10,
ObjectI3D: 1280
},
{
Kind: 10,
ObjectI3D: 1282
},
{
Kind: 10,
ObjectI3D: 1285
},
{
Kind: 10,
ObjectI3D: 1287
},
{
Kind: 10,
ObjectI3D: 1289
},
{
Kind: 10,
ObjectI3D: 1290
},
{
Kind: 10,
ObjectI3D: 1293
},
{
Kind: 10,
ObjectI3D: 1294
},
{
Kind: 10,
ObjectI3D: 1298
},
{
Kind: 10,
ObjectI3D: 1300
},
{
Kind: 10,
ObjectI3D: 1301
},
{
Kind: 10,
ObjectI3D: 1307
},
{
Kind: 10,
ObjectI3D: 1311
},
{
Kind: 10,
ObjectI3D: 1312
},
{
Kind: 10,
ObjectI3D: 1317
},
{
Kind: 10,
ObjectI3D: 1322
},
{
Kind: 10,
ObjectI3D: 1323
},
{
Kind: 10,
ObjectI3D: 1325
},
{
Kind: 10,
ObjectI3D: 1328
},
{
Kind: 10,
ObjectI3D: 1336
},
{
Kind: 10,
ObjectI3D: 1337
},
{
Kind: 10,
ObjectI3D: 1340
},
{
Kind: 10,
ObjectI3D: 1343
},
{
Kind: 10,
ObjectI3D: 1344
},
{
Kind: 10,
ObjectI3D: 1347
},
{
Kind: 10,
ObjectI3D: 4353
},
{
Kind: 10,
ObjectI3D: 4356
},
{
Kind: 10,
ObjectI3D: 4361
},
{
Kind: 10,
ObjectI3D: 6364
},
{
Kind: 10,
ObjectI3D: 6370
},
{
Kind: 10,
ObjectI3D: 6371
},
{
Kind: 10,
ObjectI3D: 6375
},
{
Kind: 10,
ObjectI3D: 6376
},
{
Kind: 10,
ObjectI3D: 6378
},
{
Kind: 10,
ObjectI3D: 6380
},
{
Kind: 10,
ObjectI3D: 6381
},
{
Kind: 10,
ObjectI3D: 6383
},
{
Kind: 10,
ObjectI3D: 6384
},
{
Kind: 10,
ObjectI3D: 6388
},
{
Kind: 10,
ObjectI3D: 6391
},
{
Kind: 10,
ObjectI3D: 6394
},
{
Kind: 10,
ObjectI3D: 6395
},
{
Kind: 10,
ObjectI3D: 7397
},
{
Kind: 10,
ObjectI3D: 7404
},
{
Kind: 10,
ObjectI3D: 8407
},
{
Kind: 10,
ObjectI3D: 8408
},
{
Kind: 10,
ObjectI3D: 9413
},
{
Kind: 10,
ObjectI3D: 9423
},
{
Kind: 10,
ObjectI3D: 9428
},
{
Kind: 10,
ObjectI3D: 9429
},
{
Kind: 10,
ObjectI3D: 9430
},
{
Kind: 10,
ObjectI3D: 9431
},
{
Kind: 10,
ObjectI3D: 10451
},
{
Kind: 10,
ObjectI3D: 10456
},
{
Kind: 10,
ObjectI3D: 10468
},
{
Kind: 10,
ObjectI3D: 10474
},
{
Kind: 10,
ObjectI3D: 10486
},
{
Kind: 10,
ObjectI3D: 10487
}
]
File diff suppressed because one or more lines are too long