Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3a9b5608
Kaydet (Commit)
3a9b5608
authored
May 14, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add perf test for removal of large array of formula cells.
Change-Id: I2fdf38b23e74a9f4cad7abd9a943e8817f39474c
üst
063d91ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
ucalc.cxx
sc/qa/unit/ucalc.cxx
+26
-1
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
3a9b5608
...
...
@@ -112,7 +112,8 @@ public:
/**
* Basic performance regression test. Pick some actions that *should* take
* only a fraction of a second to complete, and make sure they stay that
* way.
* way. We set the threshold to 1 second for each action which should be
* large enough to accommodate slower machines or machines with high load.
*/
void
testPerf
();
void
testCollator
();
...
...
@@ -486,6 +487,30 @@ void Test::testPerf()
CPPUNIT_FAIL
(
os
.
str
().
c_str
());
}
{
// Switch to R1C1 to make it easier to input relative references in multiple cells.
FormulaGrammarSwitch
aFGSwitch
(
m_pDoc
,
formula
::
FormulaGrammar
::
GRAM_ENGLISH_XL_R1C1
);
// Insert formulas in B1:B100000. This shouldn't take long, but may take
// close to a second on a slower machine. We don't measure this yet, for
// now.
for
(
SCROW
i
=
0
;
i
<
100000
;
++
i
)
m_pDoc
->
SetString
(
ScAddress
(
1
,
i
,
0
),
"=RC[-1]"
);
// Now, Delete B2:B100000. This should complete in a fraction of a second
// (0.06 sec on my machine).
osl_getSystemTime
(
&
aTimeBefore
);
clearRange
(
m_pDoc
,
ScRange
(
1
,
1
,
0
,
1
,
99999
,
0
));
osl_getSystemTime
(
&
aTimeAfter
);
diff
=
getTimeDiff
(
aTimeAfter
,
aTimeBefore
);
if
(
diff
>=
1.0
)
{
std
::
ostringstream
os
;
os
<<
"Removal of a large array of formula cells took "
<<
diff
<<
" seconds. It should be instant."
;
CPPUNIT_FAIL
(
os
.
str
().
c_str
());
}
}
m_pDoc
->
DeleteTab
(
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment